use of uk.gov.ida.saml.msa.test.transformers.ResponseToElementTransformer 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