Class SimpleRetrievalMethodEncryptedKeyResolver
- java.lang.Object
-
- org.opensaml.xmlsec.encryption.support.AbstractEncryptedKeyResolver
-
- org.opensaml.xmlsec.encryption.support.SimpleRetrievalMethodEncryptedKeyResolver
-
- All Implemented Interfaces:
EncryptedKeyResolver
public class SimpleRetrievalMethodEncryptedKeyResolver extends AbstractEncryptedKeyResolver
Implementation ofEncryptedKeyResolverwhich findsEncryptedKeyelements by dereferencingRetrievalMethodchildren of theKeyInfoof theEncryptedDatacontext. The RetrievalMethod must have aTypeattribute with the value ofEncryptionConstants.TYPE_ENCRYPTED_KEY. TheURIattribute value must be a same-document fragment identifier (via ID attribute). Processing of transforms children of RetrievalMethod is not supported by this implementation.
-
-
Field Summary
Fields Modifier and Type Field Description private org.slf4j.LoggerlogClass logger.
-
Constructor Summary
Constructors Constructor Description SimpleRetrievalMethodEncryptedKeyResolver()Constructor.SimpleRetrievalMethodEncryptedKeyResolver(String recipient)Constructor.SimpleRetrievalMethodEncryptedKeyResolver(Set<String> recipients)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected EncryptedKeydereferenceURI(RetrievalMethod rm)Dereference the URI attribute of the specified retrieval method into an EncryptedKey.Iterable<EncryptedKey>resolve(EncryptedData encryptedData)Resolve the EncryptedKey elements containing the data encryption key used to encrypt the specified EncryptedData element.-
Methods inherited from class org.opensaml.xmlsec.encryption.support.AbstractEncryptedKeyResolver
getRecipients, matchCarriedKeyName, matchDataReference, matchRecipient
-
-
-
-
Constructor Detail
-
SimpleRetrievalMethodEncryptedKeyResolver
public SimpleRetrievalMethodEncryptedKeyResolver()
Constructor.
-
SimpleRetrievalMethodEncryptedKeyResolver
public SimpleRetrievalMethodEncryptedKeyResolver(@Nullable Set<String> recipients)Constructor.- Parameters:
recipients- the set of recipients
-
SimpleRetrievalMethodEncryptedKeyResolver
public SimpleRetrievalMethodEncryptedKeyResolver(@Nullable String recipient)Constructor.- Parameters:
recipient- the recipient
-
-
Method Detail
-
resolve
@Nonnull public Iterable<EncryptedKey> resolve(@Nonnull EncryptedData encryptedData)
Resolve the EncryptedKey elements containing the data encryption key used to encrypt the specified EncryptedData element.- Parameters:
encryptedData- the EncryptedData element context in which to resolve- Returns:
- an iterable of EncryptedKey elements
-
dereferenceURI
@Nullable protected EncryptedKey dereferenceURI(@Nonnull RetrievalMethod rm)
Dereference the URI attribute of the specified retrieval method into an EncryptedKey.- Parameters:
rm- the RetrievalMethod to process- Returns:
- the dereferenced EncryptedKey
-
-