Class X509CertificateCredential

java.lang.Object
com.sun.enterprise.security.auth.login.common.X509CertificateCredential

public class X509CertificateCredential extends Object
This class holds the user certificate for the certificate realm and the realm name. This credential is added as a public credential to the JAAS subject.
  • Constructor Details

    • X509CertificateCredential

      public X509CertificateCredential(X509Certificate[] certChain, String alias, String realm)
      Construct a credential with the specified X509Certificate certificate chain, realm name and alias.
      Parameters:
      the - X509Certificate.
      the - alias for the certificate
      the - realm name. The only value supported for now is "certificate".
  • Method Details

    • getAlias

      public String getAlias()
      Return the alias for the certificate.
      Returns:
      the alias.
    • getRealm

      public String getRealm()
      Return the realm name.
      Returns:
      the realm name. Only value supported for now is "certificate".
    • getX509CertificateChain

      public X509Certificate[] getX509CertificateChain()
      Return the chain of certificates.
      Returns:
      the chain of X509Certificates.
    • equals

      public boolean equals(Object o)
      Compare two instances of the credential and return true if they are the same and false otherwise.
      Overrides:
      equals in class Object
      Returns:
      true if the instances are equal, false otherwise.
    • hashCode

      public int hashCode()
      Return the hashCode computed from the certificate, realm and alias.
      Overrides:
      hashCode in class Object
      Returns:
      the hash code.
    • toString

      public String toString()
      String representation of the credential.
      Overrides:
      toString in class Object