Package hudson.security
Class LDAPSecurityRealm.AuthoritiesPopulatorImpl
- java.lang.Object
-
- org.springframework.security.ldap.userdetails.DefaultLdapAuthoritiesPopulator
-
- hudson.security.LDAPSecurityRealm.AuthoritiesPopulatorImpl
-
- All Implemented Interfaces:
org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator
- Enclosing class:
- LDAPSecurityRealm
public static final class LDAPSecurityRealm.AuthoritiesPopulatorImpl extends org.springframework.security.ldap.userdetails.DefaultLdapAuthoritiesPopulator
LdapAuthoritiesPopulator
that adds the automatic 'authenticated' role.
-
-
Constructor Summary
Constructors Constructor Description AuthoritiesPopulatorImpl(org.springframework.ldap.core.ContextSource contextSource, String groupSearchBase)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
_getRolePrefix()
boolean
_isConvertToUpperCase()
Set<org.springframework.security.core.GrantedAuthority>
getAdditionalRoles(org.springframework.ldap.core.DirContextOperations user, String username)
org.springframework.security.core.GrantedAuthority
getDefaultRole()
Set<org.springframework.security.core.GrantedAuthority>
getGroupMembershipRoles(String userDn, String username)
Retrieves the group membership in two ways.boolean
isGeneratingPrefixRoles()
void
setConvertToUpperCase(boolean convertToUpperCase)
void
setDefaultRole(String defaultRole)
void
setRolePrefix(String rolePrefix)
-
Methods inherited from class org.springframework.security.ldap.userdetails.DefaultLdapAuthoritiesPopulator
getContextSource, getGrantedAuthorities, getGroupRoleAttribute, getGroupSearchBase, getGroupSearchFilter, getLdapTemplate, getRolePrefix, isConvertToUpperCase, setAuthorityMapper, setGroupRoleAttribute, setGroupSearchFilter, setIgnorePartialResultException, setSearchSubtree
-
-
-
-
Constructor Detail
-
AuthoritiesPopulatorImpl
public AuthoritiesPopulatorImpl(org.springframework.ldap.core.ContextSource contextSource, String groupSearchBase)
-
-
Method Detail
-
getAdditionalRoles
public Set<org.springframework.security.core.GrantedAuthority> getAdditionalRoles(org.springframework.ldap.core.DirContextOperations user, String username)
- Overrides:
getAdditionalRoles
in classorg.springframework.security.ldap.userdetails.DefaultLdapAuthoritiesPopulator
-
setRolePrefix
public void setRolePrefix(String rolePrefix)
- Overrides:
setRolePrefix
in classorg.springframework.security.ldap.userdetails.DefaultLdapAuthoritiesPopulator
-
setConvertToUpperCase
public void setConvertToUpperCase(boolean convertToUpperCase)
- Overrides:
setConvertToUpperCase
in classorg.springframework.security.ldap.userdetails.DefaultLdapAuthoritiesPopulator
-
getGroupMembershipRoles
public Set<org.springframework.security.core.GrantedAuthority> getGroupMembershipRoles(String userDn, String username)
Retrieves the group membership in two ways. We'd like to retain the original name, but we historically used to do "ROLE_GROUPNAME". So to remain backward compatible, we make the super class pass the unmodified "groupName", then do the backward compatible translation here, so that the user gets both "ROLE_GROUPNAME" and "groupName".- Overrides:
getGroupMembershipRoles
in classorg.springframework.security.ldap.userdetails.DefaultLdapAuthoritiesPopulator
-
isGeneratingPrefixRoles
public boolean isGeneratingPrefixRoles()
-
_isConvertToUpperCase
public boolean _isConvertToUpperCase()
-
_getRolePrefix
public String _getRolePrefix()
-
getDefaultRole
public org.springframework.security.core.GrantedAuthority getDefaultRole()
-
setDefaultRole
public void setDefaultRole(String defaultRole)
- Overrides:
setDefaultRole
in classorg.springframework.security.ldap.userdetails.DefaultLdapAuthoritiesPopulator
-
-