use of uk.gov.ida.hub.policy.domain.AuthenticationErrorResponse in project verify-hub by alphagov.
the class IdpSelectedStateControllerTest method handleNoAuthenticationContextResponseFromIdp_shouldTransitionToSessionCreatedStateWhenSigninCancelled.
@Test
public void handleNoAuthenticationContextResponseFromIdp_shouldTransitionToSessionCreatedStateWhenSigninCancelled() {
AuthenticationErrorResponse authenticationErrorResponse = anAuthenticationErrorResponse().withIssuerId(IDP_ENTITY_ID).build();
when(identityProvidersConfigProxy.getEnabledIdentityProviders(any(String.class), eq(controller.isRegistrationContext()), eq(PROVIDED_LOA))).thenReturn(singletonList(authenticationErrorResponse.getIssuer()));
controller.handleNoAuthenticationContextResponseFromIdp(authenticationErrorResponse);
verify(stateTransitionAction).transitionTo(isA(SessionStartedState.class));
}
use of uk.gov.ida.hub.policy.domain.AuthenticationErrorResponse in project verify-hub by alphagov.
the class AuthnResponseFromIdpService method handleAuthnFailedResponse.
private ResponseAction handleAuthnFailedResponse(InboundResponseFromIdpDto idaResponseFromIdp, SessionId sessionId, String principalIPAddressAsSeenByHub, IdpSelectedStateController idpSelectedStateController) {
AuthenticationErrorResponse authenticationErrorResponse = new AuthenticationErrorResponse(idaResponseFromIdp.getIssuer(), principalIPAddressAsSeenByHub);
idpSelectedStateController.handleAuthenticationFailedResponseFromIdp(authenticationErrorResponse);
return other(sessionId, idpSelectedStateController.isRegistrationContext());
}
use of uk.gov.ida.hub.policy.domain.AuthenticationErrorResponse in project verify-hub by alphagov.
the class AuthnResponseFromIdpService method handleUpliftFailed.
private ResponseAction handleUpliftFailed(InboundResponseFromIdpDto inboundResponseFromIdpDto, SessionId sessionId, String principalIPAddressAsSeenByHub, IdpSelectedStateController idpSelectedController) {
AuthenticationErrorResponse noAuthenticationContextErrorResponse = new AuthenticationErrorResponse(inboundResponseFromIdpDto.getIssuer(), principalIPAddressAsSeenByHub);
idpSelectedController.handleNoAuthenticationContextResponseFromIdp(noAuthenticationContextErrorResponse);
return failedUplift(sessionId, idpSelectedController.isRegistrationContext());
}
Aggregations