Class ReverseProxyAuthoritiesPopulatorImpl
java.lang.Object
org.jenkinsci.plugins.reverse_proxy_auth.auth.DefaultReverseProxyAuthoritiesPopulator
org.jenkinsci.plugins.reverse_proxy_auth.auth.ReverseProxyAuthoritiesPopulatorImpl
- All Implemented Interfaces:
ReverseProxyAuthoritiesPopulator
public final class ReverseProxyAuthoritiesPopulatorImpl
extends DefaultReverseProxyAuthoritiesPopulator
- Author:
- Wilder rodrigues (wrodrigues@schuberphilis.com)
-
Field Summary
Fields inherited from class org.jenkinsci.plugins.reverse_proxy_auth.auth.DefaultReverseProxyAuthoritiesPopulator
authContext
-
Constructor Summary
ConstructorDescriptionReverseProxyAuthoritiesPopulatorImpl
(Hashtable<String, Collection<? extends org.springframework.security.core.GrantedAuthority>> authContext) -
Method Summary
Modifier and TypeMethodDescriptionprotected Set<org.springframework.security.core.GrantedAuthority>
getAdditionalRoles
(ReverseProxyUserDetails proxyUser) This method should be overridden if required to obtain any additional roles for the given user (on top of those obtained from the standard search implemented by this class).Set<org.springframework.security.core.GrantedAuthority>
getGroupMembershipRoles
(String username) Retrieves the group membership in two ways.void
setConvertToUpperCase
(boolean convertToUpperCase) void
setRolePrefix
(String rolePrefix) Methods inherited from class org.jenkinsci.plugins.reverse_proxy_auth.auth.DefaultReverseProxyAuthoritiesPopulator
getGrantedAuthorities, setDefaultRole
-
Constructor Details
-
ReverseProxyAuthoritiesPopulatorImpl
public ReverseProxyAuthoritiesPopulatorImpl(@CheckForNull Hashtable<String, Collection<? extends org.springframework.security.core.GrantedAuthority>> authContext)
-
-
Method Details
-
getAdditionalRoles
protected Set<org.springframework.security.core.GrantedAuthority> getAdditionalRoles(ReverseProxyUserDetails proxyUser) Description copied from class:DefaultReverseProxyAuthoritiesPopulator
This method should be overridden if required to obtain any additional roles for the given user (on top of those obtained from the standard search implemented by this class).- Overrides:
getAdditionalRoles
in classDefaultReverseProxyAuthoritiesPopulator
- Parameters:
proxyUser
- the user who's roles are required- Returns:
- the extra roles which will be merged with those returned by the group search
-
setRolePrefix
- Overrides:
setRolePrefix
in classDefaultReverseProxyAuthoritiesPopulator
-
setConvertToUpperCase
public void setConvertToUpperCase(boolean convertToUpperCase) - Overrides:
setConvertToUpperCase
in classDefaultReverseProxyAuthoritiesPopulator
-
getGroupMembershipRoles
public Set<org.springframework.security.core.GrantedAuthority> getGroupMembershipRoles(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 classDefaultReverseProxyAuthoritiesPopulator
-