Package fr.gouv.vitam.common.auth.core.authc

# Class X509AuthenticationToken

java.lang.Object
fr.gouv.vitam.common.auth.core.authc.X509AuthenticationToken

All Implemented Interfaces:
  `Serializable`, `org.apache.shiro.authc.AuthenticationToken`, `org.apache.shiro.authc.HostAuthenticationToken`

public class X509AuthenticationToken extends Object implements org.apache.shiro.authc.AuthenticationToken, org.apache.shiro.authc.HostAuthenticationToken
Based on work: Copyright Paul Merlin 2011 (Apache Licence v2.0)

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `X509AuthenticationToken(X509Certificate[] clientCertChain, String host)`
  `X509AuthenticationToken(X500Principal clientSubjectDN, X500Principal clientIssuerDN, String clientHexSerialNumber, String host)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Object`
  `getCredentials()`
  `String`
  `getHexSerialNumber()`
  `String`
  `getHost()`
  `X500Principal`
  `getIssuerDN()`
  `Object`
  `getPrincipal()`
  `X500Principal`
  `getSubjectDN()`
  `CertStore`
  `getX509CertChainStore()`
  `X509Certificate`
  `getX509Certificate()`
  `CertSelector`
  `getX509CertSelector()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### X509AuthenticationToken

    public X509AuthenticationToken(X509Certificate[] clientCertChain, String host)
    Parameters:
      `clientCertChain` -
      `host` -

  - ### X509AuthenticationToken

    public X509AuthenticationToken(X500Principal clientSubjectDN, X500Principal clientIssuerDN, String clientHexSerialNumber, String host)
    Parameters:
      `clientSubjectDN` -
      `clientIssuerDN` -
      `clientHexSerialNumber` -
      `host` -

- ## Method Details

  - ### getX509Certificate

    public X509Certificate getX509Certificate()
    Returns:
      the X509 certificate

  - ### getX509CertSelector

    public CertSelector getX509CertSelector()
    Returns:
      the JVM X509 certificate selector

  - ### getX509CertChainStore

    public CertStore getX509CertChainStore()
    Returns:
      get a Store with the Cert

  - ### getSubjectDN

    public X500Principal getSubjectDN()
    Returns:
      the subjectDN

  - ### getIssuerDN

    public X500Principal getIssuerDN()
    Returns:
      the Issuer DN

  - ### getHexSerialNumber

    public String getHexSerialNumber()
    Returns:
      the Serial Number (in hexadecimal)

  - ### getPrincipal

    public Object getPrincipal()
    Specified by:
      `getPrincipal` in interface `org.apache.shiro.authc.AuthenticationToken`

  - ### getCredentials

    public Object getCredentials()
    Specified by:
      `getCredentials` in interface `org.apache.shiro.authc.AuthenticationToken`

  - ### getHost

    public String getHost()
    Specified by:
      `getHost` in interface `org.apache.shiro.authc.HostAuthenticationToken`