Class DefaultActiveDirectoryAuthoritiesPopulator
java.lang.Object
org.springframework.security.ldap.authentication.ad.DefaultActiveDirectoryAuthoritiesPopulator
- All Implemented Interfaces:
LdapAuthoritiesPopulator
public final class DefaultActiveDirectoryAuthoritiesPopulator
extends Object
implements LdapAuthoritiesPopulator
The default strategy for obtaining user role information from the active directory.
Creates the user authority list from the values of the
memberOf
attribute
obtained from the user's Active Directory entry.- Since:
- 6.3
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCollection<? extends GrantedAuthority>
getGrantedAuthorities
(org.springframework.ldap.core.DirContextOperations userData, String username) Get the list of authorities for the user.
-
Constructor Details
-
DefaultActiveDirectoryAuthoritiesPopulator
public DefaultActiveDirectoryAuthoritiesPopulator()
-
-
Method Details
-
getGrantedAuthorities
public Collection<? extends GrantedAuthority> getGrantedAuthorities(org.springframework.ldap.core.DirContextOperations userData, String username) Description copied from interface:LdapAuthoritiesPopulator
Get the list of authorities for the user.- Specified by:
getGrantedAuthorities
in interfaceLdapAuthoritiesPopulator
- Parameters:
userData
- the context object which was returned by the LDAP authenticator.- Returns:
- the granted authorities for the given user.
-