Search in sources :

Example 1 with AuthnResponseFactory

use of uk.gov.ida.saml.idp.test.AuthnResponseFactory in project verify-hub by alphagov.

the class EidasSessionResourceContractTest method createAuthnResponseSignedByKeyPair.

private static SamlAuthnResponseContainerDto createAuthnResponseSignedByKeyPair(SessionId sessionId, String publicKey, String privateKey) throws Exception {
    AuthnResponseFactory authnResponseFactory = AuthnResponseFactory.anAuthnResponseFactory();
    String samlResponse = authnResponseFactory.aSamlResponseFromCountry("a-request", COUNTRY_ENTITY_ID, publicKey, privateKey, DESTINATION, SIGNATURE_ALGORITHM, DIGEST_ALGORITHM, EncryptionConstants.ALGO_ID_BLOCKCIPHER_AES256_GCM, EidasAuthnContext.EIDAS_LOA_SUBSTANTIAL, DESTINATION, COUNTRY_ENTITY_ID);
    return new SamlAuthnResponseContainerDto(samlResponse, sessionId, "127.0.0.1");
}
Also used : SamlAuthnResponseContainerDto(uk.gov.ida.hub.policy.contracts.SamlAuthnResponseContainerDto) AuthnResponseFactory(uk.gov.ida.saml.idp.test.AuthnResponseFactory)

Aggregations

SamlAuthnResponseContainerDto (uk.gov.ida.hub.policy.contracts.SamlAuthnResponseContainerDto)1 AuthnResponseFactory (uk.gov.ida.saml.idp.test.AuthnResponseFactory)1