public HttpSecurity addFilterBefore(Filter filter, Class<? extends Filter> beforeFilter) { comparator.registerBefore(filter.getClass(), beforeFilter); return addFilter(filter); }
.addFilter(new JWTAuthenticationFilter(authenticationManager(), tokenRedis, tokenExpireTime, redisTemplate));
protected void configure(HttpSecurity http) throws Exception { http .addFilter(CAS_AUTHENTICATION_FILTER); } }
public HttpSecurity addFilterAfter(Filter filter, Class<? extends Filter> afterFilter) { comparator.registerAfter(filter.getClass(), afterFilter); return addFilter(filter); }
/** * Adds the Filter at the location of the specified Filter class. For example, if you * want the filter CustomFilter to be registered in the same position as * {@link UsernamePasswordAuthenticationFilter}, you can invoke: * * <pre> * addFilterAt(new CustomFilter(), UsernamePasswordAuthenticationFilter.class) * </pre> * * Registration of multiple Filters in the same location means their ordering is not * deterministic. More concretely, registering multiple Filters in the same location * does not override existing Filters. Instead, do not register Filters you do not * want to use. * * @param filter the Filter to register * @param atFilter the location of another {@link Filter} that is already registered * (i.e. known) with Spring Security. * @return the {@link HttpSecurity} for further customizations */ public HttpSecurity addFilterAt(Filter filter, Class<? extends Filter> atFilter) { this.comparator.registerAt(filter.getClass(), atFilter); return addFilter(filter); }
@Override protected void configure(HttpSecurity http) throws Exception { http .addFilter(new JaasApiIntegrationFilter()); } }
protected void configure(HttpSecurity http) throws Exception { http .addFilter(new UnregisteredFilter()); }
public void configure(HttpSecurity http) throws Exception { http .addFilter(tokenInfoTokenFilterSecurityInterceptor()) .authorizeRequests()
public void configure(HttpSecurity http) throws Exception { http .addFilter(tokenInfoTokenFilterSecurityInterceptor()) .authorizeRequests()
public HttpSecurity addFilterBefore(Filter filter, Class<? extends Filter> beforeFilter) { comparator.registerBefore(filter.getClass(), beforeFilter); return addFilter(filter); }
public HttpSecurity addFilterAfter(Filter filter, Class<? extends Filter> afterFilter) { comparator.registerAfter(filter.getClass(), afterFilter); return addFilter(filter); }
.addFilter(new WebAsyncManagerIntegrationFilter()) .exceptionHandling().and() .headers().and()
/** * Adds the Filter at the location of the specified Filter class. For example, if you * want the filter CustomFilter to be registered in the same position as * {@link UsernamePasswordAuthenticationFilter}, you can invoke: * * <pre> * addFilterAt(new CustomFilter(), UsernamePasswordAuthenticationFilter.class) * </pre> * * Registration of multiple Filters in the same location means their ordering is not * deterministic. More concretely, registering multiple Filters in the same location * does not override existing Filters. Instead, do not register Filters you do not * want to use. * * @param filter the Filter to register * @param atFilter the location of another {@link Filter} that is already registered * (i.e. known) with Spring Security. * @return the {@link HttpSecurity} for further customizations */ public HttpSecurity addFilterAt(Filter filter, Class<? extends Filter> atFilter) { this.comparator.registerAt(filter.getClass(), atFilter); return addFilter(filter); }
@Override public void configure(HttpSecurity http) throws Exception { http.addFilter(new AuthenticationTokenProcessingFilter()); ...
@Override public HttpSecurity addFilterAfter(Filter filter, Class<? extends Filter> afterFilter) { comparitor.registerAfter(filter.getClass(), afterFilter); return addFilter(filter); }
@Override public HttpSecurity addFilterBefore(Filter filter, Class<? extends Filter> beforeFilter) { comparitor.registerBefore(filter.getClass(), beforeFilter); return addFilter(filter); }
public HttpSecurity addFilterBefore(Filter filter, Class<? extends Filter> beforeFilter) { comparator.registerBefore(filter.getClass(), beforeFilter); return addFilter(filter); }
public HttpSecurity addFilterAfter(Filter filter, Class<? extends Filter> afterFilter) { comparator.registerAfter(filter.getClass(), afterFilter); return addFilter(filter); }
.addFilter(new WebAsyncManagerIntegrationFilter()) .exceptionHandling().and() .headers().and()
@Configuration public class WebSecurityConfig extends WebSecurityConfigurerAdapter { @Bean public SAMLWebSSOHoKProcessingFilter samlFilter() { SAMLWebSSOHoKProcessingFilter samlFilter = new SAMLWebSSOHoKProcessingFilter(); samlFilter.setAuthenticationManage(authenticationManager()); ... return samlFilter; } @Override protected void configure(HttpSecurity http) throws Exception { http.addFilter(samlFilter()); } }