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
ConstructorsConstructorDescriptionReverseProxyAuthoritiesPopulatorImpl(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.voidsetConvertToUpperCase(boolean convertToUpperCase) voidsetRolePrefix(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:DefaultReverseProxyAuthoritiesPopulatorThis 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:
getAdditionalRolesin 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:
setRolePrefixin classDefaultReverseProxyAuthoritiesPopulator
-
setConvertToUpperCase
public void setConvertToUpperCase(boolean convertToUpperCase) - Overrides:
setConvertToUpperCasein 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:
getGroupMembershipRolesin classDefaultReverseProxyAuthoritiesPopulator
-