public class RunAsUserToken extends AbstractAuthenticationToken
Authentication
implementation
that supports RunAsManagerImpl
.Constructor and Description |
---|
RunAsUserToken(java.lang.String key,
java.lang.Object principal,
java.lang.Object credentials,
java.util.Collection<? extends GrantedAuthority> authorities,
java.lang.Class<? extends Authentication> originalAuthentication) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getCredentials()
The credentials that prove the principal is correct.
|
int |
getKeyHash() |
java.lang.Class<? extends Authentication> |
getOriginalAuthentication() |
java.lang.Object |
getPrincipal()
The identity of the principal being authenticated.
|
java.lang.String |
toString() |
equals, eraseCredentials, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setAuthenticated, setDetails
public RunAsUserToken(java.lang.String key, java.lang.Object principal, java.lang.Object credentials, java.util.Collection<? extends GrantedAuthority> authorities, java.lang.Class<? extends Authentication> originalAuthentication)
public java.lang.Object getCredentials()
Authentication
AuthenticationManager
. Callers
are expected to populate the credentials.Principal
public int getKeyHash()
public java.lang.Class<? extends Authentication> getOriginalAuthentication()
public java.lang.Object getPrincipal()
Authentication
The AuthenticationManager implementation will often return an
Authentication containing richer information as the principal for use by
the application. Many of the authentication providers will create a
UserDetails
object as the principal.
Principal
being authenticated or the authenticated
principal after authentication.public java.lang.String toString()
toString
in interface java.security.Principal
toString
in class AbstractAuthenticationToken