Search in sources :

Example 1 with ResponseSignatureCreator

use of uk.gov.ida.saml.core.transformers.outbound.decorators.ResponseSignatureCreator 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));
}
Also used : KeyStoreBackedEncryptionCredentialResolver(uk.gov.ida.saml.security.KeyStoreBackedEncryptionCredentialResolver) IdaKeyStoreCredentialRetriever(uk.gov.ida.saml.security.IdaKeyStoreCredentialRetriever) ResponseAssertionSigner(uk.gov.ida.saml.core.transformers.outbound.decorators.ResponseAssertionSigner) EncrypterFactory(uk.gov.ida.saml.security.EncrypterFactory) SignatureFactory(uk.gov.ida.saml.security.SignatureFactory) ResponseToElementTransformer(uk.gov.ida.saml.msa.test.transformers.ResponseToElementTransformer) ResponseSignatureCreator(uk.gov.ida.saml.core.transformers.outbound.decorators.ResponseSignatureCreator) SamlResponseAssertionEncrypter(uk.gov.ida.saml.core.transformers.outbound.decorators.SamlResponseAssertionEncrypter)

Aggregations

ResponseAssertionSigner (uk.gov.ida.saml.core.transformers.outbound.decorators.ResponseAssertionSigner)1 ResponseSignatureCreator (uk.gov.ida.saml.core.transformers.outbound.decorators.ResponseSignatureCreator)1 SamlResponseAssertionEncrypter (uk.gov.ida.saml.core.transformers.outbound.decorators.SamlResponseAssertionEncrypter)1 ResponseToElementTransformer (uk.gov.ida.saml.msa.test.transformers.ResponseToElementTransformer)1 EncrypterFactory (uk.gov.ida.saml.security.EncrypterFactory)1 IdaKeyStoreCredentialRetriever (uk.gov.ida.saml.security.IdaKeyStoreCredentialRetriever)1 KeyStoreBackedEncryptionCredentialResolver (uk.gov.ida.saml.security.KeyStoreBackedEncryptionCredentialResolver)1 SignatureFactory (uk.gov.ida.saml.security.SignatureFactory)1