Class X509AuthenticationToken

java.lang.Object
org.springframework.security.authentication.AbstractAuthenticationToken
org.springframework.ws.soap.security.x509.X509AuthenticationToken
All Implemented Interfaces:
Serializable, Principal, org.springframework.security.core.Authentication, org.springframework.security.core.CredentialsContainer

public class X509AuthenticationToken extends org.springframework.security.authentication.AbstractAuthenticationToken
Authentication implementation for X.509 client-certificate authentication.

Migrated from Spring Security 2 since it has been removed in Spring Security 3.

See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.springframework.security.authentication.AbstractAuthenticationToken

    org.springframework.security.authentication.AbstractAuthenticationToken.AbstractAuthenticationBuilder<B extends org.springframework.security.authentication.AbstractAuthenticationToken.AbstractAuthenticationBuilder<B>>

    Nested classes/interfaces inherited from interface org.springframework.security.core.Authentication

    org.springframework.security.core.Authentication.Builder<B extends org.springframework.security.core.Authentication.Builder<B>>
  • Constructor Summary

    Constructors
    Constructor
    Description
    X509AuthenticationToken(Object principal, X509Certificate credentials, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
    Used for an authentication response object.
    Used for an authentication request.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    @Nullable Object
     

    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 org.springframework.security.core.Authentication

    toBuilder

    Methods inherited from interface java.security.Principal

    implies
  • Constructor Details

    • X509AuthenticationToken

      public X509AuthenticationToken(X509Certificate credentials)
      Used for an authentication request. The Authentication.isAuthenticated() will return false.
      Parameters:
      credentials - the certificate
    • X509AuthenticationToken

      public X509AuthenticationToken(Object principal, X509Certificate credentials, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
      Used for an authentication response object. The Authentication.isAuthenticated() will return true.
      Parameters:
      principal - the principal, which is generally a UserDetails
      credentials - the certificate
      authorities - the authorities
  • Method Details

    • getCredentials

      public Object getCredentials()
    • getPrincipal

      public @Nullable Object getPrincipal()