简体   繁体   中英

WSO2 Identity Server - distinguish users from Primary userstore and secondary userstore

Is it possible to distinguish whether the user is from the primary userstore or a secondary user store? I would like to prevent the user from modifying his profile if he is from a secondary userstore.

If the user is from secondary user store, his user name will contain the user store domain he contains.

The username follows following format,

userstore/username@tenantdomain

You can get user store domain from this.

In primary user store users, userstore part will not be contained in username.

As explained in the above answer if you have a secondary user store set up with the name "WSO2.COM" and a user with name user@tenant1.com. Actual username to be used to login should be "WSO2.COM/user@tenant1.com". You can find more information on how to set up the secondary user store please refer to links [1],[2]. If would like to prevent user to modifying the profile. Please enable the read-only mode as explained in [2].

[1] https://medium.com/@pubududp/how-to-use-active-directory-as-a-secondary-user-store-in-tenant-mode-for-wso2-products-f49ac4829e41#.2ujax4wud

[2] http://pushpalankajaya.blogspot.com/2013/09/how-to-write-custom-user-store-manager.html

Cheers, Pubudu.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM