开发者

How to manually query LDAP through Acegi's beans?

I have an application using Acegi (earlier version of Spring Security) and LDAP for logins. Now, a specific scenario requires me to discover user's LDAP groups at arbitrary time (not at login time).

Is it possible to use already set up Acegi to handle this situation开发者_Go百科?

I'm thinking of using the configured LdapAuthProvider (or LdapAuthPopulator or whatever's appropriate) to get all the groups associated with a given username. Is this possible?

If yes, please, please, give some hints how it should be done...


You should use DefaultLdapAuthoritiesPopulator.getGroupMembershipRoles(String userDn, String username).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜