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;
}
Aggregations