Search in sources :

Example 1 with MailNonceAuthenticationFilter

use of com.evolveum.midpoint.authentication.impl.filter.MailNonceAuthenticationFilter in project midpoint by Evolveum.

the class MailNonceFormModuleWebSecurityConfigurer method configure.

@Override
protected void configure(HttpSecurity http) throws Exception {
    super.configure(http);
    http.antMatcher(AuthUtil.stripEndingSlashes(getPrefix()) + "/**");
    getOrApply(http, new MidpointFormLoginConfigurer<>(new MailNonceAuthenticationFilter())).loginPage(getConfiguration().getSpecificLoginUrl() == null ? "/emailNonce" : getConfiguration().getSpecificLoginUrl()).failureHandler(new MidpointAuthenticationFailureHandler()).successHandler(getObjectPostProcessor().postProcess(new MidPointAuthenticationSuccessHandler())).permitAll();
    getOrApply(http, new MidpointExceptionHandlingConfigurer<>()).authenticationEntryPoint(new WicketLoginUrlAuthenticationEntryPoint(getConfiguration().getSpecificLoginUrl() == null ? "/emailNonce" : getConfiguration().getSpecificLoginUrl()));
    http.logout().clearAuthentication(true).logoutRequestMatcher(getLogoutMatcher(http, getPrefix() + "/logout")).invalidateHttpSession(true).deleteCookies("JSESSIONID").logoutSuccessHandler(createLogoutHandler());
}
Also used : MidPointAuthenticationSuccessHandler(com.evolveum.midpoint.authentication.impl.handler.MidPointAuthenticationSuccessHandler) MidpointAuthenticationFailureHandler(com.evolveum.midpoint.authentication.impl.handler.MidpointAuthenticationFailureHandler) WicketLoginUrlAuthenticationEntryPoint(com.evolveum.midpoint.authentication.impl.entry.point.WicketLoginUrlAuthenticationEntryPoint) MailNonceAuthenticationFilter(com.evolveum.midpoint.authentication.impl.filter.MailNonceAuthenticationFilter) MidpointExceptionHandlingConfigurer(com.evolveum.midpoint.authentication.impl.filter.configurers.MidpointExceptionHandlingConfigurer)

Aggregations

WicketLoginUrlAuthenticationEntryPoint (com.evolveum.midpoint.authentication.impl.entry.point.WicketLoginUrlAuthenticationEntryPoint)1 MailNonceAuthenticationFilter (com.evolveum.midpoint.authentication.impl.filter.MailNonceAuthenticationFilter)1 MidpointExceptionHandlingConfigurer (com.evolveum.midpoint.authentication.impl.filter.configurers.MidpointExceptionHandlingConfigurer)1 MidPointAuthenticationSuccessHandler (com.evolveum.midpoint.authentication.impl.handler.MidPointAuthenticationSuccessHandler)1 MidpointAuthenticationFailureHandler (com.evolveum.midpoint.authentication.impl.handler.MidpointAuthenticationFailureHandler)1