Configuring Uniqueness of Claims¶
Note
This feature is available from WSO2 Identity Server 5.11.0.22 onwards.
WSO2 Identity Server can be configured to retain the uniqueness of user claims. After enabling this feature, you can keep a user claim value as a unique value within all userstores.
Configuring WSO2 IS to keep the user claim values unique¶
Follow the steps below to configure WSO2 Identity Server.
-
Open the
deployment.toml
file in the<IS_HOME>/repository/conf
directory and add the following configuration.[[event_listener]] id = "unique_claim_user_operation_event_listener" type = "org.wso2.carbon.user.core.listener.UserOperationEventListener" name = "org.wso2.carbon.identity.unique.claim.mgt.listener.UniqueClaimUserOperationEventListener" order = 2 enable = true
-
Restart WSO2 identity server and access the Management Console (
https://<IS_HOST>:<PORT>/carbon
) . -
From the list of claims, select the claim you want to configure to keep it unique.
-
Open the claim edit window by clicking the
Edit
button. -
By clicking
Add Claim Property
, add an additional claim property as follows.Property Name Property Value isUnique true
- Finally, click the
Update
button to save the additional claim property.
Now you can check and verify the functionality by adding users with an existing claim value or updating the user claim value of an existing claim.
Top