Class PreAuthenticatedAuthenticationToken

  • All Implemented Interfaces:
    java.io.Serializable, java.security.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
    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 org.springframework.security.core.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 credentials
      java.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
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.security.Principal

        implies
    • Constructor Detail

      • PreAuthenticatedAuthenticationToken

        public PreAuthenticatedAuthenticationToken​(java.lang.Object aPrincipal,
                                                   java.lang.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​(java.lang.Object aPrincipal,
                                                   java.lang.Object aCredentials,
                                                   java.util.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 java.lang.Object getCredentials()
        Get the credentials
      • getPrincipal

        public java.lang.Object getPrincipal()
        Get the principal