use of uk.gov.ida.saml.core.transformers.outbound.decorators.SamlResponseAssertionEncrypter in project verify-hub by alphagov.
the class MsaTransformersFactory method getResponseToElementTransformer.
public ResponseToElementTransformer getResponseToElementTransformer(EncryptionKeyStore encryptionKeyStore, IdaKeyStore keyStore, EntityToEncryptForLocator entityToEncryptForLocator, SignatureAlgorithm signatureAlgorithm, DigestAlgorithm digestAlgorithm) {
SignatureFactory signatureFactory = new SignatureFactory(new IdaKeyStoreCredentialRetriever(keyStore), signatureAlgorithm, digestAlgorithm);
SamlResponseAssertionEncrypter assertionEncrypter = new SamlResponseAssertionEncrypter(new KeyStoreBackedEncryptionCredentialResolver(encryptionKeyStore), new EncrypterFactory(), entityToEncryptForLocator);
return new ResponseToElementTransformer(new XmlObjectToElementTransformer<>(), new SamlSignatureSigner<>(), assertionEncrypter, new ResponseAssertionSigner(signatureFactory), new ResponseSignatureCreator(signatureFactory));
}
Aggregations