public class ImpersonatingUserDetailsService2 extends Object implements org.springframework.security.core.userdetails.UserDetailsService
UserDetailsService
for those SecurityRealm
that doesn't allow query of other users.
When the backend responds with UserMayOrMayNotExistException2
, we try to replace that with
information stored in LastGrantedAuthoritiesProperty
.Constructor and Description |
---|
ImpersonatingUserDetailsService2(org.springframework.security.core.userdetails.UserDetailsService base) |
Modifier and Type | Method and Description |
---|---|
protected org.springframework.security.core.userdetails.UserDetails |
attemptToImpersonate(String username,
RuntimeException e) |
org.springframework.security.core.userdetails.UserDetails |
loadUserByUsername(String username) |
public ImpersonatingUserDetailsService2(org.springframework.security.core.userdetails.UserDetailsService base)
public org.springframework.security.core.userdetails.UserDetails loadUserByUsername(String username) throws org.springframework.security.core.userdetails.UsernameNotFoundException
loadUserByUsername
in interface org.springframework.security.core.userdetails.UserDetailsService
org.springframework.security.core.userdetails.UsernameNotFoundException
protected org.springframework.security.core.userdetails.UserDetails attemptToImpersonate(String username, RuntimeException e)
Copyright © 2004–2021. All rights reserved.