Package jenkins.security
Class ImpersonatingUserDetailsService2
- java.lang.Object
-
- jenkins.security.ImpersonatingUserDetailsService2
-
- All Implemented Interfaces:
org.springframework.security.core.userdetails.UserDetailsService
public class ImpersonatingUserDetailsService2 extends Object implements org.springframework.security.core.userdetails.UserDetailsService
UserDetailsService
for thoseSecurityRealm
that doesn't allow query of other users. When the backend responds withUserMayOrMayNotExistException2
, we try to replace that with information stored inLastGrantedAuthoritiesProperty
.- Author:
- Kohsuke Kawaguchi
-
-
Constructor Summary
Constructors Constructor Description ImpersonatingUserDetailsService2(org.springframework.security.core.userdetails.UserDetailsService base)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.springframework.security.core.userdetails.UserDetails
attemptToImpersonate(String username, RuntimeException e)
org.springframework.security.core.userdetails.UserDetails
loadUserByUsername(String username)
-
-
-
Method Detail
-
loadUserByUsername
public org.springframework.security.core.userdetails.UserDetails loadUserByUsername(String username) throws org.springframework.security.core.userdetails.UsernameNotFoundException
- Specified by:
loadUserByUsername
in interfaceorg.springframework.security.core.userdetails.UserDetailsService
- Throws:
org.springframework.security.core.userdetails.UsernameNotFoundException
-
attemptToImpersonate
protected org.springframework.security.core.userdetails.UserDetails attemptToImpersonate(String username, RuntimeException e)
-
-