Search in sources :

Example 1 with WaitingForMatchingServiceResponseStateController

use of uk.gov.ida.hub.policy.domain.controller.WaitingForMatchingServiceResponseStateController in project verify-hub by alphagov.

the class MatchingServiceResponseService method handleNoMatchResponseFromMatchingService.

private void handleNoMatchResponseFromMatchingService(SessionId sessionId, InboundResponseFromMatchingServiceDto inboundResponseFromMatchingServiceDto) {
    NoMatchFromMatchingService noMatchFromMatchingService = new NoMatchFromMatchingService(inboundResponseFromMatchingServiceDto.getIssuer(), inboundResponseFromMatchingServiceDto.getInResponseTo());
    WaitingForMatchingServiceResponseStateController stateController = (WaitingForMatchingServiceResponseStateController) sessionRepository.getStateController(sessionId, WaitingForMatchingServiceResponseState.class);
    stateController.handleNoMatchResponseFromMatchingService(noMatchFromMatchingService);
}
Also used : WaitingForMatchingServiceResponseStateController(uk.gov.ida.hub.policy.domain.controller.WaitingForMatchingServiceResponseStateController) NoMatchFromMatchingService(uk.gov.ida.hub.policy.domain.NoMatchFromMatchingService) WaitingForMatchingServiceResponseState(uk.gov.ida.hub.policy.domain.state.WaitingForMatchingServiceResponseState)

Example 2 with WaitingForMatchingServiceResponseStateController

use of uk.gov.ida.hub.policy.domain.controller.WaitingForMatchingServiceResponseStateController in project verify-hub by alphagov.

the class MatchingServiceResponseService method handleMatchResponseFromMatchingService.

private void handleMatchResponseFromMatchingService(SessionId sessionId, InboundResponseFromMatchingServiceDto inboundResponseFromMatchingServiceDto) {
    MatchFromMatchingService matchFromMatchingService = new MatchFromMatchingService(inboundResponseFromMatchingServiceDto.getIssuer(), inboundResponseFromMatchingServiceDto.getInResponseTo(), inboundResponseFromMatchingServiceDto.getEncryptedMatchingServiceAssertion().get(), inboundResponseFromMatchingServiceDto.getLevelOfAssurance());
    WaitingForMatchingServiceResponseStateController stateController = (WaitingForMatchingServiceResponseStateController) sessionRepository.getStateController(sessionId, WaitingForMatchingServiceResponseState.class);
    stateController.handleMatchResponseFromMatchingService(matchFromMatchingService);
}
Also used : WaitingForMatchingServiceResponseStateController(uk.gov.ida.hub.policy.domain.controller.WaitingForMatchingServiceResponseStateController) NoMatchFromMatchingService(uk.gov.ida.hub.policy.domain.NoMatchFromMatchingService) MatchFromMatchingService(uk.gov.ida.hub.policy.domain.MatchFromMatchingService) WaitingForMatchingServiceResponseState(uk.gov.ida.hub.policy.domain.state.WaitingForMatchingServiceResponseState)

Example 3 with WaitingForMatchingServiceResponseStateController

use of uk.gov.ida.hub.policy.domain.controller.WaitingForMatchingServiceResponseStateController in project verify-hub by alphagov.

the class MatchingServiceResponseService method handleUserAccountCreationFailedResponseFromMatchingService.

private void handleUserAccountCreationFailedResponseFromMatchingService(SessionId sessionId) {
    WaitingForMatchingServiceResponseStateController stateController = (WaitingForMatchingServiceResponseStateController) sessionRepository.getStateController(sessionId, WaitingForMatchingServiceResponseState.class);
    stateController.handleUserAccountCreationFailedResponseFromMatchingService();
}
Also used : WaitingForMatchingServiceResponseStateController(uk.gov.ida.hub.policy.domain.controller.WaitingForMatchingServiceResponseStateController) WaitingForMatchingServiceResponseState(uk.gov.ida.hub.policy.domain.state.WaitingForMatchingServiceResponseState)

Example 4 with WaitingForMatchingServiceResponseStateController

use of uk.gov.ida.hub.policy.domain.controller.WaitingForMatchingServiceResponseStateController in project verify-hub by alphagov.

the class MatchingServiceResponseService method handleUserAccountCreatedResponseFromMatchingService.

private void handleUserAccountCreatedResponseFromMatchingService(SessionId sessionId, InboundResponseFromMatchingServiceDto inboundResponseFromMatchingServiceDto) {
    UserAccountCreatedFromMatchingService userAccountCreatedFromMatchingService = new UserAccountCreatedFromMatchingService(inboundResponseFromMatchingServiceDto.getIssuer(), inboundResponseFromMatchingServiceDto.getInResponseTo(), inboundResponseFromMatchingServiceDto.getEncryptedMatchingServiceAssertion().get(), inboundResponseFromMatchingServiceDto.getLevelOfAssurance());
    WaitingForMatchingServiceResponseStateController stateController = (WaitingForMatchingServiceResponseStateController) sessionRepository.getStateController(sessionId, WaitingForMatchingServiceResponseState.class);
    stateController.handleUserAccountCreatedResponseFromMatchingService(userAccountCreatedFromMatchingService);
}
Also used : WaitingForMatchingServiceResponseStateController(uk.gov.ida.hub.policy.domain.controller.WaitingForMatchingServiceResponseStateController) UserAccountCreatedFromMatchingService(uk.gov.ida.hub.policy.domain.UserAccountCreatedFromMatchingService) WaitingForMatchingServiceResponseState(uk.gov.ida.hub.policy.domain.state.WaitingForMatchingServiceResponseState)

Example 5 with WaitingForMatchingServiceResponseStateController

use of uk.gov.ida.hub.policy.domain.controller.WaitingForMatchingServiceResponseStateController in project verify-hub by alphagov.

the class MatchingServiceResponseService method handleHubMatchingServiceRequestFailure.

private void handleHubMatchingServiceRequestFailure(SessionId sessionId) {
    WaitingForMatchingServiceResponseStateController stateController = (WaitingForMatchingServiceResponseStateController) sessionRepository.getStateController(sessionId, WaitingForMatchingServiceResponseState.class);
    stateController.handleRequestFailure();
}
Also used : WaitingForMatchingServiceResponseStateController(uk.gov.ida.hub.policy.domain.controller.WaitingForMatchingServiceResponseStateController) WaitingForMatchingServiceResponseState(uk.gov.ida.hub.policy.domain.state.WaitingForMatchingServiceResponseState)

Aggregations

WaitingForMatchingServiceResponseStateController (uk.gov.ida.hub.policy.domain.controller.WaitingForMatchingServiceResponseStateController)5 WaitingForMatchingServiceResponseState (uk.gov.ida.hub.policy.domain.state.WaitingForMatchingServiceResponseState)5 NoMatchFromMatchingService (uk.gov.ida.hub.policy.domain.NoMatchFromMatchingService)2 MatchFromMatchingService (uk.gov.ida.hub.policy.domain.MatchFromMatchingService)1 UserAccountCreatedFromMatchingService (uk.gov.ida.hub.policy.domain.UserAccountCreatedFromMatchingService)1