public 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 Saml2X509Credentials representing Service Provider credentials for
signing, decryption or both.
|
Saml2X509Credential(java.security.cert.X509Certificate certificate,
Saml2X509Credential.Saml2X509CredentialType... types)
Creates a Saml2X509Credentials representing Identity Provider credentials for
verification, encryption or both.
|
| Modifier and Type | Method and Description |
|---|---|
java.security.cert.X509Certificate |
getCertificate()
Returns the X509 certificate for ths credential.
|
protected java.util.Set<Saml2X509Credential.Saml2X509CredentialType> |
getCredentialTypes()
Returns the credential types for this credential.
|
java.security.PrivateKey |
getPrivateKey()
Returns the private key, or null if this credential type doesn't require one.
|
boolean |
isDecryptionCredential()
Returns true if the credential has a private key and can be used for decryption, the types will contain
Saml2X509Credential.Saml2X509CredentialType.DECRYPTION. |
boolean |
isEncryptionCredential()
Returns true if the credential has a certificate and can be used for signature verification, the types will contain
Saml2X509Credential.Saml2X509CredentialType.VERIFICATION. |
boolean |
isSignatureVerficationCredential()
Returns true if the credential has a certificate and can be used for signature verification, the types will contain
Saml2X509Credential.Saml2X509CredentialType.VERIFICATION. |
boolean |
isSigningCredential()
Returns true if the credential has a private key and can be used for signing, the types will contain
Saml2X509Credential.Saml2X509CredentialType.SIGNING. |
public Saml2X509Credential(java.security.cert.X509Certificate certificate,
Saml2X509Credential.Saml2X509CredentialType... types)
certificate - an IDP X509Certificate, cannot be nulltypes - credential types, 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)
privateKey - a private key used for signing or decryption, cannot be nullcertificate - an SP X509Certificate shared with identity providers, cannot be nulltypes - credential types, must be one of Saml2X509Credential.Saml2X509CredentialType.SIGNING or
Saml2X509Credential.Saml2X509CredentialType.DECRYPTION or both.public boolean isSigningCredential()
Saml2X509Credential.Saml2X509CredentialType.SIGNING.Saml2X509Credential.Saml2X509CredentialType.SIGNING typepublic boolean isDecryptionCredential()
Saml2X509Credential.Saml2X509CredentialType.DECRYPTION.Saml2X509Credential.Saml2X509CredentialType.DECRYPTION typepublic boolean isSignatureVerficationCredential()
Saml2X509Credential.Saml2X509CredentialType.VERIFICATION.Saml2X509Credential.Saml2X509CredentialType.VERIFICATION typepublic boolean isEncryptionCredential()
Saml2X509Credential.Saml2X509CredentialType.VERIFICATION.Saml2X509Credential.Saml2X509CredentialType.VERIFICATION typeprotected java.util.Set<Saml2X509Credential.Saml2X509CredentialType> getCredentialTypes()
public java.security.PrivateKey getPrivateKey()
#Saml2X509Credential(PrivateKey, X509Certificate, Saml2X509CredentialType...)}public java.security.cert.X509Certificate getCertificate()