Skip to content

Commit

Permalink
Add EventScenarioTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
AnjanaSamindraPerera committed Mar 15, 2024
1 parent a619cb9 commit 9184f85
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 57 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
import org.wso2.carbon.identity.scim2.common.utils.AttributeMapper;
import org.wso2.carbon.identity.scim2.common.utils.SCIMCommonConstants;
import org.wso2.carbon.identity.scim2.common.utils.SCIMCommonUtils;
import org.wso2.carbon.identity.scim2.common.utils.Scenarios;
import org.wso2.carbon.user.api.ClaimMapping;
import org.wso2.carbon.user.api.UserStoreException;
import org.wso2.carbon.user.core.PaginatedUserStoreManager;
Expand Down Expand Up @@ -6301,10 +6300,10 @@ private void publishEvent(User user, String eventName, boolean isAdminUpdate)
properties.put(IdentityEventConstants.EventProperty.CREDENTIAL, user.getPassword());
if (isAdminUpdate) {
properties.put(IdentityEventConstants.EventProperty.SCENARIO,
Scenarios.ADMIN_UPDATED.name());
SCIMCommonConstants.EventScenarioTypes.POST_CREDENTIAL_UPDATE_BY_ADMIN.name());
} else {
properties.put(IdentityEventConstants.EventProperty.SCENARIO,
Scenarios.SELF_UPDATED.name());
SCIMCommonConstants.EventScenarioTypes.POST_CREDENTIAL_UPDATE_BY_USER.name());
}

Event identityMgtEvent = new Event(eventName, properties);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,5 +213,14 @@ public String toString() {
return code + " : " + message;
}
}

/**
* Enum which contains the event scenario types.
*/
public enum EventScenarioTypes {

POST_CREDENTIAL_UPDATE_BY_ADMIN,
POST_CREDENTIAL_UPDATE_BY_USER,
}
}

This file was deleted.

0 comments on commit 9184f85

Please sign in to comment.