Package io.jmix.core.security.impl
Class SubstitutedUserAuthenticationProvider
java.lang.Object
io.jmix.core.security.impl.SubstitutedUserAuthenticationProvider
- All Implemented Interfaces:
org.springframework.security.authentication.AuthenticationProvider
public class SubstitutedUserAuthenticationProvider
extends Object
implements org.springframework.security.authentication.AuthenticationProvider
-
Constructor Summary
ConstructorsConstructorDescriptionSubstitutedUserAuthenticationProvider(org.springframework.security.core.userdetails.UserDetailsService userDetailsService) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.core.Authenticationauthenticate(org.springframework.security.core.Authentication authentication) protected Collection<? extends org.springframework.security.core.GrantedAuthority> getEffectiveAuthorities(SubstitutedUserAuthenticationToken substitutedAuthentication, org.springframework.security.core.userdetails.UserDetails substitutedUser) Merge authorities: Substituted user authorities Original user factor authorities Substitution factor authorityboolean
-
Constructor Details
-
SubstitutedUserAuthenticationProvider
public SubstitutedUserAuthenticationProvider(org.springframework.security.core.userdetails.UserDetailsService userDetailsService)
-
-
Method Details
-
authenticate
public org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication) throws org.springframework.security.core.AuthenticationException - Specified by:
authenticatein interfaceorg.springframework.security.authentication.AuthenticationProvider- Throws:
org.springframework.security.core.AuthenticationException
-
supports
- Specified by:
supportsin interfaceorg.springframework.security.authentication.AuthenticationProvider
-
getEffectiveAuthorities
protected Collection<? extends org.springframework.security.core.GrantedAuthority> getEffectiveAuthorities(SubstitutedUserAuthenticationToken substitutedAuthentication, org.springframework.security.core.userdetails.UserDetails substitutedUser) Merge authorities:- Substituted user authorities
- Original user factor authorities
- Substitution factor authority
- Parameters:
substitutedAuthentication- token with original authoritiessubstitutedUser- user details with substituted authorities- Returns:
- merged authorities
-