use of uk.gov.ida.hub.policy.domain.IdpConfigDto in project verify-hub by alphagov.
the class SessionStartedStateControllerTest method setup.
@Before
public void setup() {
sessionStartedState = aSessionStartedState().withTransactionSupportsEidas(true).build();
when(transactionsConfigProxy.getLevelsOfAssurance(sessionStartedState.getRequestIssuerEntityId())).thenReturn(asList(LevelOfAssurance.LEVEL_1, LevelOfAssurance.LEVEL_2));
IdpConfigDto idpConfigDto = new IdpConfigDto(IDP_ENTITY_ID, true, ImmutableList.of(LevelOfAssurance.LEVEL_2, LevelOfAssurance.LEVEL_1));
when(identityProvidersConfigProxy.getIdpConfig(IDP_ENTITY_ID)).thenReturn(idpConfigDto);
when(identityProvidersConfigProxy.getEnabledIdentityProviders(sessionStartedState.getRequestIssuerEntityId(), REGISTERING, LevelOfAssurance.LEVEL_2)).thenReturn(singletonList(IDP_ENTITY_ID));
controller = new SessionStartedStateController(sessionStartedState, hubEventLogger, stateTransitionAction, transactionsConfigProxy, responseFromHubFactory, identityProvidersConfigProxy);
}
use of uk.gov.ida.hub.policy.domain.IdpConfigDto in project verify-hub by alphagov.
the class AuthnFailedErrorStateControllerTest method setup.
@Before
public void setup() {
authnFailedErrorState = anAuthnFailedErrorState().withTransactionSupportsEidas(true).build();
when(transactionsConfigProxy.getLevelsOfAssurance(authnFailedErrorState.getRequestIssuerEntityId())).thenReturn(asList(LevelOfAssurance.LEVEL_1, LevelOfAssurance.LEVEL_2));
IdpConfigDto idpConfigDto = new IdpConfigDto(IDP_ENTITY_ID, true, asList(LevelOfAssurance.LEVEL_1, LevelOfAssurance.LEVEL_2));
when(identityProvidersConfigProxy.getIdpConfig(IDP_ENTITY_ID)).thenReturn(idpConfigDto);
when(identityProvidersConfigProxy.getEnabledIdentityProviders(authnFailedErrorState.getRequestIssuerEntityId(), REGISTERING, LevelOfAssurance.LEVEL_2)).thenReturn(singletonList(IDP_ENTITY_ID));
controller = new AuthnFailedErrorStateController(authnFailedErrorState, responseFromHubFactory, stateTransitionAction, transactionsConfigProxy, identityProvidersConfigProxy, hubEventLogger);
}
Aggregations