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());
}
Aggregations