Search in sources :

Example 1 with InboundHealthCheckResponseFromMatchingService

use of uk.gov.ida.saml.hub.domain.InboundHealthCheckResponseFromMatchingService in project verify-hub by alphagov.

the class MatchingServiceHealthcheckResponseTranslatorService method translate.

public MatchingServiceHealthCheckerResponseDto translate(SamlMessageDto samlMessageDto) {
    Response response = responseUnmarshaller.apply(samlMessageDto.getSamlMessage());
    MdcHelper.addContextToMdc(response);
    final InboundHealthCheckResponseFromMatchingService responseFromMatchingService = samlResponseToInboundHealthCheckResponseFromMatchingServiceTransformer.transform(response);
    final MatchingServiceHealthCheckerResponseDto matchingServiceHealthCheckerResponseDto = new MatchingServiceHealthCheckerResponseDto(responseFromMatchingService.getStatus(), responseFromMatchingService.getInResponseTo(), responseFromMatchingService.getIssuer(), responseFromMatchingService.getId());
    return matchingServiceHealthCheckerResponseDto;
}
Also used : Response(org.opensaml.saml.saml2.core.Response) MatchingServiceHealthCheckerResponseDto(uk.gov.ida.hub.samlengine.contracts.MatchingServiceHealthCheckerResponseDto) InboundHealthCheckResponseFromMatchingService(uk.gov.ida.saml.hub.domain.InboundHealthCheckResponseFromMatchingService)

Aggregations

Response (org.opensaml.saml.saml2.core.Response)1 MatchingServiceHealthCheckerResponseDto (uk.gov.ida.hub.samlengine.contracts.MatchingServiceHealthCheckerResponseDto)1 InboundHealthCheckResponseFromMatchingService (uk.gov.ida.saml.hub.domain.InboundHealthCheckResponseFromMatchingService)1