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 Summary
Constructors Constructor Description X509CertificateCredential(X509Certificate[] certChain, String alias, String realm)
Construct a credential with the specified X509Certificate certificate chain, realm name and alias.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Compare two instances of the credential and return true if they are the same and false otherwise.String
getAlias()
Return the alias for the certificate.String
getRealm()
Return the realm name.X509Certificate[]
getX509CertificateChain()
Return the chain of certificates.int
hashCode()
Return the hashCode computed from the certificate, realm and alias.String
toString()
String representation of the credential.
-
-
-
Constructor Detail
-
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 certificatethe
- realm name. The only value supported for now is "certificate".
-
-
Method Detail
-
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.
-
hashCode
public int hashCode()
Return the hashCode computed from the certificate, realm and alias.
-
-