Class Decrypter
java.lang.Object
org.opensaml.xmlsec.encryption.support.Decrypter
org.opensaml.saml.saml2.encryption.Decrypter
Class which implements SAML2-specific options for
EncryptedElementType
objects.
For information on other parameters and options, and general XML Encryption issues,
see Decrypter
.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDecrypter
(DecryptionParameters params) Constructor.Decrypter
(KeyInfoCredentialResolver newResolver, KeyInfoCredentialResolver newKEKResolver, EncryptedKeyResolver newEncKeyResolver) Constructor.Decrypter
(KeyInfoCredentialResolver newResolver, KeyInfoCredentialResolver newKEKResolver, EncryptedKeyResolver newEncKeyResolver, Collection<String> includeAlgos, Collection<String> excludeAlgos) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiondecrypt
(EncryptedAssertion encryptedAssertion) Decrypt the specified EncryptedAssertion.decrypt
(EncryptedAttribute encryptedAttribute) Decrypt the specified EncryptedAttribute.decrypt
(EncryptedID encryptedID) Decrypt the specified EncryptedID.decrypt
(NewEncryptedID newEncryptedID) Decrypt the specified NewEncryptedID.private SAMLObject
decryptData
(EncryptedElementType encElement) Decrypt the specified instance of EncryptedElementType, and return it as an instance of the specified QName.private void
logPostDecryption
(XMLObject xmlObject) Log the target object after decryption.Methods inherited from class org.opensaml.xmlsec.encryption.support.Decrypter
buildParserPool, checkAndMarshall, decryptData, decryptData, decryptDataToDOM, decryptDataToDOM, decryptDataToList, decryptDataToList, decryptKey, decryptKey, getJCAProviderName, getKEKResolverCriteria, getKeyResolverCriteria, isRootInNewDocument, preProcessEncryptedKey, setJCAProviderName, setKEKResolverCriteria, setKeyResolverCriteria, setRootInNewDocument, validateAlgorithms, validateAlgorithms, validateAlgorithmURI
-
Field Details
-
log
private final org.slf4j.Logger logClass logger.
-
-
Constructor Details
-
Decrypter
Constructor.- Parameters:
params
- decryption parameters to use
-
Decrypter
public Decrypter(@Nullable KeyInfoCredentialResolver newResolver, @Nullable KeyInfoCredentialResolver newKEKResolver, @Nullable EncryptedKeyResolver newEncKeyResolver) Constructor.- Parameters:
newResolver
- resolver for data encryption keys.newKEKResolver
- resolver for key encryption keys.newEncKeyResolver
- resolver for EncryptedKey elements
-
Decrypter
public Decrypter(@Nullable KeyInfoCredentialResolver newResolver, @Nullable KeyInfoCredentialResolver newKEKResolver, @Nullable EncryptedKeyResolver newEncKeyResolver, @Nullable Collection<String> includeAlgos, @Nullable Collection<String> excludeAlgos) Constructor.- Parameters:
newResolver
- resolver for data encryption keys.newKEKResolver
- resolver for key encryption keys.newEncKeyResolver
- resolver for EncryptedKey elementsincludeAlgos
- collection of included algorithm URIsexcludeAlgos
- collection of excluded algorithm URIs
-
-
Method Details
-
decrypt
Decrypt the specified EncryptedAssertion.- Parameters:
encryptedAssertion
- the EncryptedAssertion to decrypt- Returns:
- an Assertion
- Throws:
DecryptionException
- thrown when decryption generates an error
-
decrypt
Decrypt the specified EncryptedAttribute.- Parameters:
encryptedAttribute
- the EncryptedAttribute to decrypt- Returns:
- an Attribute
- Throws:
DecryptionException
- thrown when decryption generates an error
-
decrypt
Decrypt the specified EncryptedID.Note that an EncryptedID can contain a NameID, an Assertion or a BaseID. It is up to the caller to determine the type of the resulting SAMLObject.
- Parameters:
encryptedID
- the EncryptedID to decrypt- Returns:
- an XMLObject
- Throws:
DecryptionException
- thrown when decryption generates an error
-
decrypt
Decrypt the specified NewEncryptedID.- Parameters:
newEncryptedID
- the NewEncryptedID to decrypt- Returns:
- a NewID
- Throws:
DecryptionException
- thrown when decryption generates an error
-
decryptData
Decrypt the specified instance of EncryptedElementType, and return it as an instance of the specified QName.- Parameters:
encElement
- the EncryptedElementType to decrypt- Returns:
- the decrypted SAMLObject
- Throws:
DecryptionException
- thrown when decryption generates an error
-
logPostDecryption
Log the target object after decryption.- Parameters:
xmlObject
- the decrypted XMLObject
-