From WSO2 Identity server 5.9.0 onwards, admins can configure the user store preference order for a service provider during the authentication.
This guide helps you to configure the user store preference order for a service provider.
To set up the WSO2 identity Server to configure the user store preference order:
-
Implement the
UserStorePreferenceOrderSupplier
interface with your own logic to retrieve the user store order.Use the provided template to implement the UserStorePreferenceOrderSupplier interface.
-
Extend the
CallBackHandlerFactory
interface and create an object of your customUserStorePreferenceOrderSupplier
.Use the provided template to extend the CallBackHandlerFactory interface.
-
Add the following configuration to the
<IS-HOME>/repository/conf/deployment.toml
file to configure theCallBackHandlerFactory
interface.[authentication.framework.extensions] callback_factory = "org.wso2.carbon.identity.custom.callback.userstore.CustomUserStoreOrderCallbackFactory"
-
Restart the WSO2 Identity Server if it's already running.
To update the preference order:
-
On the WSO2 Identity Server Management Console, go to Main > Registry > Browse
-
Navigate to _system > config and click on
userstore-metadata.xml
file. -
Go to Properties and click
+
. The table shows the values obtained from the Following are the details represented in the table.Parameter Description Name Name of the service provider to which the user store preference order is applied. Value The user store preference order in which the WSO2 Identity Server will authenticate the users logging into the specified service provider. -
Click Edit to modify the values.