Class PreAuthenticatedAuthenticationToken
- java.lang.Object
-
- org.springframework.security.authentication.AbstractAuthenticationToken
-
- org.springframework.security.web.authentication.preauth.PreAuthenticatedAuthenticationToken
-
- All Implemented Interfaces:
java.io.Serializable
,java.security.Principal
,Authentication
,CredentialsContainer
public class PreAuthenticatedAuthenticationToken extends AbstractAuthenticationToken
Authentication
implementation for pre-authenticated authentication.- Since:
- 2.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PreAuthenticatedAuthenticationToken(java.lang.Object aPrincipal, java.lang.Object aCredentials)
Constructor used for an authentication request.PreAuthenticatedAuthenticationToken(java.lang.Object aPrincipal, java.lang.Object aCredentials, java.util.Collection<? extends GrantedAuthority> anAuthorities)
Constructor used for an authentication response.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
getCredentials()
Get the credentialsjava.lang.Object
getPrincipal()
Get the principal-
Methods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken
equals, eraseCredentials, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setAuthenticated, setDetails, toString
-
-
-
-
Constructor Detail
-
PreAuthenticatedAuthenticationToken
public PreAuthenticatedAuthenticationToken(java.lang.Object aPrincipal, java.lang.Object aCredentials)
Constructor used for an authentication request. TheAuthentication.isAuthenticated()
will returnfalse
.- Parameters:
aPrincipal
- The pre-authenticated principalaCredentials
- The pre-authenticated credentials
-
PreAuthenticatedAuthenticationToken
public PreAuthenticatedAuthenticationToken(java.lang.Object aPrincipal, java.lang.Object aCredentials, java.util.Collection<? extends GrantedAuthority> anAuthorities)
Constructor used for an authentication response. TheAuthentication.isAuthenticated()
will returntrue
.- Parameters:
aPrincipal
- The authenticated principalanAuthorities
- The granted authorities
-
-
Method Detail
-
getCredentials
public java.lang.Object getCredentials()
Get the credentials- Returns:
- the credentials that prove the identity of the
Principal
-
getPrincipal
public java.lang.Object getPrincipal()
Get the principal- Returns:
- the
Principal
being authenticated or the authenticated principal after authentication.
-
-