Class DefaultLdapAuthoritiesPopulator
java.lang.Object
com.codename1.backend.security.ldap.DefaultLdapAuthoritiesPopulator
- All Implemented Interfaces:
LdapAuthoritiesPopulator
public final class DefaultLdapAuthoritiesPopulator
extends Object
implements LdapAuthoritiesPopulator
Roles from the groups a user is a member of, as Spring's: the groups under
a search base whose
member names the user, each group's cn becoming
ROLE_ and its name in upper case. {0} in the filter is the user's DN,
{1} the user name.-
Constructor Summary
ConstructorsConstructorDescriptionDefaultLdapAuthoritiesPopulator(LdapContextSource contextSource, String groupSearchBase) -
Method Summary
Modifier and TypeMethodDescriptiongetGrantedAuthorities(LdapEntry user, String username) voidsetConvertToUpperCase(boolean convert) voidsetDefaultRole(String role) A role every user signed in this way has.voidsetGroupRoleAttribute(String attribute) voidsetGroupSearchFilter(String filter) voidsetRolePrefix(String prefix) voidsetSearchSubtree(boolean searchSubtree) Whether to look below the group search base; false by default, as Spring's.
-
Constructor Details
-
DefaultLdapAuthoritiesPopulator
- Parameters:
groupSearchBase- relative to the base; null for no group search
-
-
Method Details
-
setGroupSearchFilter
-
setGroupRoleAttribute
-
setRolePrefix
-
setConvertToUpperCase
public void setConvertToUpperCase(boolean convert) -
setSearchSubtree
public void setSearchSubtree(boolean searchSubtree) Whether to look below the group search base; false by default, as Spring's. -
setDefaultRole
A role every user signed in this way has. -
getGrantedAuthorities
- Specified by:
getGrantedAuthoritiesin interfaceLdapAuthoritiesPopulator
-