Methods Summary |
---|
public boolean | equals(java.lang.Object o)Compare two instances of the credential and return true if they are
the same and false otherwise.
if(o instanceof X509CertificateCredential) {
X509CertificateCredential pc = (X509CertificateCredential) o;
if(pc.getRealm().equals(realm) && pc.getAlias().equals(alias)) {
X509Certificate[] certs = pc.getX509CertificateChain();
for(int i = 0; i < certs.length; i++) {
if(!certs[i].equals(certChain[i])) {
return false;
}
}
return true;
}
}
return false;
|
public java.lang.String | getAlias()Return the alias for the certificate.
return alias;
|
public java.lang.String | getRealm()Return the realm name.
return realm;
|
public java.security.cert.X509Certificate[] | getX509CertificateChain()Return the chain of certificates.
return certChain;
|
public int | hashCode()Return the hashCode computed from the certificate, realm and alias.
return certChain.hashCode() + realm.hashCode() + alias.hashCode();
|
public java.lang.String | toString()String representation of the credential.
String s = "Realm=" + realm;
s = s + " alias=" + alias;
s = s + " X509Certificate=" + certChain;
return s;
|