public final class Saml2X509Credential
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Saml2X509Credential.Saml2X509CredentialType |
Constructor and Description |
---|
Saml2X509Credential(java.security.PrivateKey privateKey,
java.security.cert.X509Certificate certificate,
Saml2X509Credential.Saml2X509CredentialType... types)
Creates a
Saml2X509Credential using the provided parameters |
Saml2X509Credential(java.security.PrivateKey privateKey,
java.security.cert.X509Certificate certificate,
java.util.Set<Saml2X509Credential.Saml2X509CredentialType> types)
Creates a
Saml2X509Credential using the provided parameters |
Saml2X509Credential(java.security.cert.X509Certificate certificate,
Saml2X509Credential.Saml2X509CredentialType... types)
Creates a
Saml2X509Credential using the provided parameters |
Modifier and Type | Method and Description |
---|---|
static Saml2X509Credential |
decryption(java.security.PrivateKey privateKey,
java.security.cert.X509Certificate certificate)
Create a
Saml2X509Credential that can be used for decryption. |
static Saml2X509Credential |
encryption(java.security.cert.X509Certificate certificate)
Create a
Saml2X509Credential that can be used for encryption. |
boolean |
equals(java.lang.Object o) |
java.security.cert.X509Certificate |
getCertificate()
Get the public certificate for this credential
|
java.util.Set<Saml2X509Credential.Saml2X509CredentialType> |
getCredentialTypes()
List all this credential's intended usages
|
java.security.PrivateKey |
getPrivateKey()
Get the private key for this credential
|
int |
hashCode() |
boolean |
isDecryptionCredential()
Indicate whether this credential can be used for decryption
|
boolean |
isEncryptionCredential()
Indicate whether this credential can be used for encryption
|
boolean |
isSigningCredential()
Indicate whether this credential can be used for signing
|
boolean |
isVerificationCredential()
Indicate whether this credential can be used for verification
|
static Saml2X509Credential |
signing(java.security.PrivateKey privateKey,
java.security.cert.X509Certificate certificate)
Create a
Saml2X509Credential that can be used for signing. |
static Saml2X509Credential |
verification(java.security.cert.X509Certificate certificate)
Create a
Saml2X509Credential that can be used for verification. |
public Saml2X509Credential(java.security.cert.X509Certificate certificate, Saml2X509Credential.Saml2X509CredentialType... types)
Saml2X509Credential
using the provided parameterscertificate
- the credential's public certificiatetypes
- the credential's intended usages, must be one of
Saml2X509Credential.Saml2X509CredentialType.VERIFICATION
or
Saml2X509Credential.Saml2X509CredentialType.ENCRYPTION
or both.public Saml2X509Credential(java.security.PrivateKey privateKey, java.security.cert.X509Certificate certificate, Saml2X509Credential.Saml2X509CredentialType... types)
Saml2X509Credential
using the provided parametersprivateKey
- the credential's private keycertificate
- the credential's public certificatetypes
- the credential's intended usages, must be one of
Saml2X509Credential.Saml2X509CredentialType.SIGNING
or
Saml2X509Credential.Saml2X509CredentialType.DECRYPTION
or both.public Saml2X509Credential(java.security.PrivateKey privateKey, java.security.cert.X509Certificate certificate, java.util.Set<Saml2X509Credential.Saml2X509CredentialType> types)
Saml2X509Credential
using the provided parametersprivateKey
- the credential's private keycertificate
- the credential's public certificatetypes
- the credential's intended usagespublic static Saml2X509Credential encryption(java.security.cert.X509Certificate certificate)
Saml2X509Credential
that can be used for encryption.certificate
- the certificate to use for encryptionpublic static Saml2X509Credential verification(java.security.cert.X509Certificate certificate)
Saml2X509Credential
that can be used for verification.certificate
- the certificate to use for verificationpublic static Saml2X509Credential decryption(java.security.PrivateKey privateKey, java.security.cert.X509Certificate certificate)
Saml2X509Credential
that can be used for decryption.privateKey
- the private key to use for decryptioncertificate
- the certificate to use for decryptionpublic static Saml2X509Credential signing(java.security.PrivateKey privateKey, java.security.cert.X509Certificate certificate)
Saml2X509Credential
that can be used for signing.privateKey
- the private key to use for signingcertificate
- the certificate to use for signingpublic java.security.PrivateKey getPrivateKey()
Saml2X509Credential(PrivateKey, X509Certificate, Saml2X509CredentialType...)
public java.security.cert.X509Certificate getCertificate()
public boolean isSigningCredential()
Saml2X509Credential.Saml2X509CredentialType.SIGNING
typepublic boolean isDecryptionCredential()
Saml2X509Credential.Saml2X509CredentialType.DECRYPTION
typepublic boolean isVerificationCredential()
Saml2X509Credential.Saml2X509CredentialType.VERIFICATION
typepublic boolean isEncryptionCredential()
Saml2X509Credential.Saml2X509CredentialType.ENCRYPTION
typepublic java.util.Set<Saml2X509Credential.Saml2X509CredentialType> getCredentialTypes()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object