use of org.apereo.cas.web.support.CasLocaleChangeInterceptor in project cas by apereo.
the class DefaultLoginWebflowConfigurerTests method verifyOperation.
@Test
public void verifyOperation() {
assertFalse(casWebflowExecutionPlan.getWebflowConfigurers().isEmpty());
val interceptors = casWebflowExecutionPlan.getWebflowInterceptors();
assertEquals(2, interceptors.size());
assertTrue(interceptors.stream().anyMatch(interceptor -> interceptor instanceof CasLocaleChangeInterceptor));
assertTrue(interceptors.stream().anyMatch(interceptor -> interceptor instanceof ResourceUrlProviderExposingInterceptor));
val flow = (Flow) this.loginFlowDefinitionRegistry.getFlowDefinition(CasWebflowConfigurer.FLOW_ID_LOGIN);
assertNotNull(flow);
assertTrue(flow.containsState(CasWebflowConstants.STATE_ID_VIEW_LOGIN_FORM));
assertTrue(flow.containsState(CasWebflowConstants.STATE_ID_INIT_LOGIN_FORM));
assertTrue(flow.containsState(CasWebflowConstants.STATE_ID_CREATE_TICKET_GRANTING_TICKET));
assertTrue(flow.containsState(CasWebflowConstants.STATE_ID_SEND_TICKET_GRANTING_TICKET));
assertTrue(flow.containsState(CasWebflowConstants.STATE_ID_GENERATE_SERVICE_TICKET));
assertTrue(flow.containsState(CasWebflowConstants.STATE_ID_HANDLE_AUTHN_FAILURE));
assertTrue(flow.containsState(CasWebflowConstants.STATE_ID_POST_VIEW));
assertTrue(flow.containsState(CasWebflowConstants.STATE_ID_REDIRECT));
assertTrue(flow.containsState(CasWebflowConstants.STATE_ID_SERVICE_AUTHZ_CHECK));
assertTrue(flow.containsState(CasWebflowConstants.STATE_ID_VIEW_GENERIC_LOGIN_SUCCESS));
assertTrue(flow.containsState(CasWebflowConstants.STATE_ID_VIEW_REDIR_UNAUTHZ_URL));
assertTrue(flow.containsState(CasWebflowConstants.STATE_ID_VIEW_SERVICE_ERROR));
assertTrue(flow.containsState(CasWebflowConstants.STATE_ID_GATEWAY_REQUEST_CHECK));
assertTrue(flow.containsState(CasWebflowConstants.STATE_ID_VIEW_GENERIC_LOGIN_SUCCESS));
}
use of org.apereo.cas.web.support.CasLocaleChangeInterceptor in project cas by apereo.
the class DefaultLogoutWebflowConfigurerTests method verifyOperation.
@Test
public void verifyOperation() {
assertFalse(casWebflowExecutionPlan.getWebflowConfigurers().isEmpty());
val interceptors = casWebflowExecutionPlan.getWebflowInterceptors();
assertEquals(2, interceptors.size());
assertTrue(interceptors.stream().anyMatch(interceptor -> interceptor instanceof CasLocaleChangeInterceptor));
assertTrue(interceptors.stream().anyMatch(interceptor -> interceptor instanceof ResourceUrlProviderExposingInterceptor));
val flow = (Flow) this.logoutFlowDefinitionRegistry.getFlowDefinition(CasWebflowConfigurer.FLOW_ID_LOGOUT);
assertNotNull(flow);
assertTrue(flow.containsState(CasWebflowConstants.STATE_ID_TERMINATE_SESSION));
assertTrue(flow.containsState(CasWebflowConstants.STATE_ID_FINISH_LOGOUT));
assertTrue(flow.containsState(CasWebflowConstants.STATE_ID_LOGOUT_VIEW));
assertTrue(flow.containsState(CasWebflowConstants.STATE_ID_FRONT_LOGOUT));
assertTrue(flow.containsState(CasWebflowConstants.STATE_ID_DO_LOGOUT));
assertTrue(flow.containsState(CasWebflowConstants.STATE_ID_CONFIRM_LOGOUT_VIEW));
assertTrue(flow.containsState(CasWebflowConstants.STATE_ID_POST_VIEW));
}
Aggregations