spring-security-web

org.springframework.security.web.authentication.preauth
Class PreAuthenticatedAuthenticationToken

java.lang.Object
  extended by org.springframework.security.authentication.AbstractAuthenticationToken
      extended by org.springframework.security.web.authentication.preauth.PreAuthenticatedAuthenticationToken
All Implemented Interfaces:
Serializable, Principal, org.springframework.security.core.Authentication, org.springframework.security.core.CredentialsContainer

public class PreAuthenticatedAuthenticationToken
extends org.springframework.security.authentication.AbstractAuthenticationToken

Authentication implementation for pre-authenticated authentication.

Since:
2.0
Author:
Ruud Senden
See Also:
Serialized Form

Constructor Summary
PreAuthenticatedAuthenticationToken(Object aPrincipal, Object aCredentials)
          Constructor used for an authentication request.
PreAuthenticatedAuthenticationToken(Object aPrincipal, Object aCredentials, Collection<? extends org.springframework.security.core.GrantedAuthority> anAuthorities)
          Constructor used for an authentication response.
 
Method Summary
 Object getCredentials()
          Get the credentials
 Object getPrincipal()
          Get the principal
 
Methods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken
equals, eraseCredentials, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setAuthenticated, setDetails, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PreAuthenticatedAuthenticationToken

public PreAuthenticatedAuthenticationToken(Object aPrincipal,
                                           Object aCredentials)
Constructor used for an authentication request. The Authentication.isAuthenticated() will return false.

Parameters:
aPrincipal - The pre-authenticated principal
aCredentials - The pre-authenticated credentials

PreAuthenticatedAuthenticationToken

public PreAuthenticatedAuthenticationToken(Object aPrincipal,
                                           Object aCredentials,
                                           Collection<? extends org.springframework.security.core.GrantedAuthority> anAuthorities)
Constructor used for an authentication response. The Authentication.isAuthenticated() will return true.

Parameters:
aPrincipal - The authenticated principal
anAuthorities - The granted authorities
Method Detail

getCredentials

public Object getCredentials()
Get the credentials


getPrincipal

public Object getPrincipal()
Get the principal


spring-security-web