@groovy.transform.CompileStatic class GrailsLdapAuthoritiesPopulator extends DefaultLdapAuthoritiesPopulator implements InitializingBean
| Modifiers | Name | Description |
|---|---|---|
protected boolean |
roleConvertDashes |
|
protected java.lang.String |
roleStripPrefix |
|
protected java.lang.String |
roleStripSuffix |
|
protected boolean |
roleToUpperCase |
| Type | Name and description |
|---|---|
java.lang.Boolean |
retrieveDatabaseRolesDependency injection for whether to retrieve roles from the database in addition to LDAP. |
GrailsUserDetailsService |
userDetailsServiceDependency injection for the user details service. |
| Constructor and description |
|---|
GrailsLdapAuthoritiesPopulator(ContextSource contextSource, java.lang.String groupSearchBase)Constructor for group search scenarios. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
void |
afterPropertiesSet() |
|
GrantedAuthority |
cleanRole(GrantedAuthority role)This cleans a role based on configuration flags set. |
|
protected java.util.Set<GrantedAuthority> |
getAdditionalRoles(DirContextOperations user, java.lang.String username) |
|
java.util.Set<GrantedAuthority> |
getGroupMembershipRoles(java.lang.String userDn, java.lang.String username) |
|
void |
setRoleConvertDashes(boolean convertDashes)Dependency injection for whether or not to convert all dashes to underscores if found in a group name before it is made into a role. |
|
void |
setRoleStripPrefix(java.lang.String prefix)Dependency injection for whether or not to remove a prefix string from a LDAP group name if it matches the beginning of the group name, but not the full name of the group. |
|
void |
setRoleStripSuffix(java.lang.String suffix)Dependency injection for whether or not to remove a suffix string from a LDAP group name if it matches the end of the group name, but not the full name of the group. |
|
void |
setRoleToUpperCase(boolean toUpperCase)Dependency injection for whether or not to convert group names to uppercase before they are made into roles. |
|
protected void |
updateRoleStripPrefix()Hooks to adjust prefix string if other cleaning flags are set |
|
protected void |
updateRoleStripSuffix()Hooks to adjust suffix string if other cleaning flags are set |
Dependency injection for whether to retrieve roles from the database in addition to LDAP.
Dependency injection for the user details service.
Constructor for group search scenarios. userRoleAttributes may still be set as a property.
contextSource - supplies the contexts used to search for user roles.groupSearchBase - if this is an empty string the search will be performed from the root DN of the
context factory.This cleans a role based on configuration flags set.
role - the role to cleanDependency injection for whether or not to convert all dashes to underscores if found in a group name before it is made into a role.
convertDashes - if true, all dashes are converted to underscoresDependency injection for whether or not to remove a prefix string from a LDAP group name if it matches the beginning of the group name, but not the full name of the group.
prefix - if not null, this is stripped from the group name before it is made into a roleDependency injection for whether or not to remove a suffix string from a LDAP group name if it matches the end of the group name, but not the full name of the group.
suffix - if not null, this is stripped from the group name before it is made into a roleDependency injection for whether or not to convert group names to uppercase before they are made into roles.
toUpperCase - if true, roles are converted to uppercaseHooks to adjust prefix string if other cleaning flags are set
Hooks to adjust suffix string if other cleaning flags are set