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 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:
      authenticate in interface org.springframework.security.authentication.AuthenticationProvider
      Throws:
      org.springframework.security.core.AuthenticationException
    • supports

      public boolean supports(Class<?> authentication)
      Specified by:
      supports in interface org.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 authorities
      substitutedUser - user details with substituted authorities
      Returns:
      merged authorities