use of uk.gov.ida.hub.policy.domain.state.EidasSuccessfulMatchState in project verify-hub by alphagov.
the class EidasCycle0And1MatchRequestSentStateControllerTest method shouldReturnSuccessfulMatchState.
@Test
public void shouldReturnSuccessfulMatchState() {
MatchFromMatchingService matchFromMatchingService = new MatchFromMatchingService("issuer", "inResponseTo", "matchingServiceAssertion", Optional.of(LevelOfAssurance.LEVEL_2));
doNothing().when(hubEventLogger).logCycle01SuccessfulMatchEvent(state.getSessionId(), state.getRequestIssuerEntityId(), state.getRequestId(), state.getSessionExpiryTimestamp());
EidasSuccessfulMatchState expectedState = new EidasSuccessfulMatchState(state.getRequestId(), state.getSessionExpiryTimestamp(), state.getIdentityProviderEntityId(), matchFromMatchingService.getMatchingServiceAssertion(), state.getRelayState().orNull(), state.getRequestIssuerEntityId(), state.getAssertionConsumerServiceUri(), state.getSessionId(), state.getIdpLevelOfAssurance(), state.getTransactionSupportsEidas());
State actualState = eidasCycle0And1MatchRequestSentStateController.getNextStateForMatch(matchFromMatchingService);
assertThat(actualState).isEqualTo(expectedState);
}
use of uk.gov.ida.hub.policy.domain.state.EidasSuccessfulMatchState in project verify-hub by alphagov.
the class TestSessionResourceHelper method createSessionInEidasSuccessfulMatchState.
public static Response createSessionInEidasSuccessfulMatchState(SessionId sessionId, String rpEntityId, String countryEntityId, Client client, URI uri) {
EidasSuccessfulMatchState eidasSuccessfulMatchState = aEidasSuccessfulMatchState().withRequestIssuerId(rpEntityId).withSessionId(sessionId).withIdentityProviderEntityId(countryEntityId).build();
TestSessionDto testSessionDto = createASuccessfulMatchStateTestSessionDto(eidasSuccessfulMatchState, sessionId);
return client.target(uri).request(MediaType.APPLICATION_JSON_TYPE).post(Entity.json(testSessionDto));
}
Aggregations