Class ProxyLDAPAuthoritiesPopulator
- java.lang.Object
-
- org.acegisecurity.providers.ldap.populator.DefaultLdapAuthoritiesPopulator
-
- org.jenkinsci.plugins.reverse_proxy_auth.service.ProxyLDAPAuthoritiesPopulator
-
- All Implemented Interfaces:
org.acegisecurity.providers.ldap.LdapAuthoritiesPopulator
public class ProxyLDAPAuthoritiesPopulator extends org.acegisecurity.providers.ldap.populator.DefaultLdapAuthoritiesPopulator
LdapAuthoritiesPopulator
that adds the automatic 'authenticated' role.
-
-
Constructor Summary
Constructors Constructor Description ProxyLDAPAuthoritiesPopulator(org.acegisecurity.ldap.InitialDirContextFactory initialDirContextFactory, String groupSearchBase)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Set
getAdditionalRoles(org.acegisecurity.userdetails.ldap.LdapUserDetails ldapUser)
Set<GrantedAuthority>
getGroupMembershipRoles(String userDn, String username)
Retrieves the group membership in two ways.void
setConvertToUpperCase(boolean convertToUpperCase)
void
setRolePrefix(String rolePrefix)
-
-
-
Constructor Detail
-
ProxyLDAPAuthoritiesPopulator
public ProxyLDAPAuthoritiesPopulator(org.acegisecurity.ldap.InitialDirContextFactory initialDirContextFactory, String groupSearchBase)
-
-
Method Detail
-
getAdditionalRoles
protected Set getAdditionalRoles(org.acegisecurity.userdetails.ldap.LdapUserDetails ldapUser)
- Overrides:
getAdditionalRoles
in classorg.acegisecurity.providers.ldap.populator.DefaultLdapAuthoritiesPopulator
-
setRolePrefix
public void setRolePrefix(String rolePrefix)
- Overrides:
setRolePrefix
in classorg.acegisecurity.providers.ldap.populator.DefaultLdapAuthoritiesPopulator
-
setConvertToUpperCase
public void setConvertToUpperCase(boolean convertToUpperCase)
- Overrides:
setConvertToUpperCase
in classorg.acegisecurity.providers.ldap.populator.DefaultLdapAuthoritiesPopulator
-
getGroupMembershipRoles
public Set<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.acegisecurity.providers.ldap.populator.DefaultLdapAuthoritiesPopulator
-
-