简体   繁体   中英

Building a customized user store manager for WSO2

I am trying to configure WSO2 to authenticate a user via LDAP, but then augment the user with attributes stored elsewhere (exploring some legacy integration-type scenarios, so moving everything to LDAP really isn't in the cards).

The user attribute documentation ( https://docs.wso2.com/display/IS560/Managing+User+Attributes#ManagingUserAttributes-Writingcustomattributes ) indicates that this is best accomplished by writing a custom user store and https://docs.wso2.com/display/IS560/Writing+a+Custom+User+Store+Manager#WritingaCustomUserStoreManager-ImplementingacustomJDBCuserstoremanager lists out AbstractUserStoreManager as the class to extend and work with (though, in all probability, we would extend a subsclass).

The problem I am running into as I am rummaging through the WSO2 IS code on github is that I cannot seem to find a class by this name or methods by the names mentioned in the documentation. My guess would be that sometime between 4.4-ish and present (5.6 being the version I downloaded as an MSI) that the integration point changed. Has it changed? If not, where should I be looking for the classes to extend?

You can look in the wso2-carbon-kernal for the classes. For IS 5.6 try looking in the 4.4.x branch of carbon-kernel

https://github.com/wso2/carbon-kernel/tree/4.4.x/core/org.wso2.carbon.user.core/src/main/java/org/wso2/carbon/user/core

如果您使用LDAP进行身份验证,我建议您扩展ReadOnlyLDAPUserStoreManager并覆盖getUserProperties方法(或类似的东西,我现在不记得方法名称)

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