use of org.opensaml.xmlsec.encryption.support.InlineEncryptedKeyResolver in project cas by apereo.
the class WsFederationHelper method buildAssertionDecrypter.
private static Decrypter buildAssertionDecrypter(final WsFederationConfiguration config) {
final List<EncryptedKeyResolver> list = new ArrayList<>();
list.add(new InlineEncryptedKeyResolver());
list.add(new EncryptedElementTypeEncryptedKeyResolver());
list.add(new SimpleRetrievalMethodEncryptedKeyResolver());
LOGGER.debug("Built a list of encrypted key resolvers: [{}]", list);
final ChainingEncryptedKeyResolver encryptedKeyResolver = new ChainingEncryptedKeyResolver(list);
LOGGER.debug("Building credential instance to decrypt data");
final Credential encryptionCredential = getEncryptionCredential(config);
final KeyInfoCredentialResolver resolver = new StaticKeyInfoCredentialResolver(encryptionCredential);
final Decrypter decrypter = new Decrypter(null, resolver, encryptedKeyResolver);
decrypter.setRootInNewDocument(true);
return decrypter;
}
Aggregations