org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter Java Examples

The following examples show how to use org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FormLoginConfigurerEnhancer.java    From recaptcha-spring-boot-starter with Apache License 2.0 5 votes vote down vote up
public FormLoginConfigurer<HttpSecurity> addRecaptchaSupport(FormLoginConfigurer<HttpSecurity> loginConfigurer) {
    Field authFilterField = findField(loginConfigurer.getClass(), AUTHENTICATION_PROCESSING_FILTER_FIELD, AbstractAuthenticationProcessingFilter.class);
    makeAccessible(authFilterField);
    setField(authFilterField, loginConfigurer, authenticationFilter);
    return loginConfigurer.usernameParameter(DEFAULT_USERNAME_PARAMETER)
            .successHandler(successHandler)
            .failureHandler(failureHandler);
}
 
Example #2
Source File: WebSecurityConfig.java    From spring-custom-token-auth with MIT License 4 votes vote down vote up
protected AbstractAuthenticationProcessingFilter createCustomFilter() throws Exception {
	//here we define the interfaces which don't need any authorisation
	AuthFilter filter = new AuthFilter(new NegatedRequestMatcher(
	  new AndRequestMatcher(
		 new AntPathRequestMatcher("/login"),
		 new AntPathRequestMatcher("/health")
	  )
	));
	filter.setAuthenticationManager(authenticationManagerBean());
	return filter;
}
 
Example #3
Source File: SecurityUtils.java    From onetwo with Apache License 2.0 4 votes vote down vote up
public static FormLoginConfigurer<HttpSecurity> hackFormLoginAuthFilter(FormLoginConfigurer<HttpSecurity> formLoginConfig, AbstractAuthenticationProcessingFilter filter){
	ReflectUtils.getIntro(FormLoginConfigurer.class).setFieldValue(formLoginConfig, "authFilter", filter);
	return formLoginConfig;
}