Search in sources :

Example 1 with RequestForErrorResponseFromHubDto

use of uk.gov.ida.hub.policy.contracts.RequestForErrorResponseFromHubDto in project verify-hub by alphagov.

the class SessionService method getRpErrorResponse.

public AuthnResponseFromHubContainerDto getRpErrorResponse(SessionId sessionId) {
    getSessionIfItExists(sessionId);
    final ResponseFromHub errorResponseFromHub = authnRequestHandler.getErrorResponseFromHub(sessionId);
    final RequestForErrorResponseFromHubDto requestForErrorResponseFromHubDto = new RequestForErrorResponseFromHubDto(errorResponseFromHub.getAuthnRequestIssuerEntityId(), errorResponseFromHub.getResponseId(), errorResponseFromHub.getInResponseTo(), errorResponseFromHub.getAssertionConsumerServiceUri(), errorResponseFromHub.getStatus());
    final SamlMessageDto samlMessageDto = samlEngineProxy.generateErrorResponseFromHub(requestForErrorResponseFromHubDto);
    final AuthnResponseFromHubContainerDto authnResponseFromHubContainerDto = new AuthnResponseFromHubContainerDto(samlMessageDto.getSamlMessage(), errorResponseFromHub.getAssertionConsumerServiceUri(), errorResponseFromHub.getRelayState(), errorResponseFromHub.getResponseId());
    return authnResponseFromHubContainerDto;
}
Also used : AuthnResponseFromHubContainerDto(uk.gov.ida.hub.policy.contracts.AuthnResponseFromHubContainerDto) SamlMessageDto(uk.gov.ida.hub.policy.contracts.SamlMessageDto) RequestForErrorResponseFromHubDto(uk.gov.ida.hub.policy.contracts.RequestForErrorResponseFromHubDto) ResponseFromHub(uk.gov.ida.hub.policy.domain.ResponseFromHub)

Aggregations

AuthnResponseFromHubContainerDto (uk.gov.ida.hub.policy.contracts.AuthnResponseFromHubContainerDto)1 RequestForErrorResponseFromHubDto (uk.gov.ida.hub.policy.contracts.RequestForErrorResponseFromHubDto)1 SamlMessageDto (uk.gov.ida.hub.policy.contracts.SamlMessageDto)1 ResponseFromHub (uk.gov.ida.hub.policy.domain.ResponseFromHub)1