parent
e0fc8f37b0
commit
fc658d10d3
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2020 the original author or authors.
|
* Copyright 2002-2024 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -24,10 +24,10 @@ import org.springframework.security.config.annotation.SecurityConfigurer;
|
||||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||||
import org.springframework.security.oauth2.server.resource.web.authentication.BearerTokenAuthenticationFilter;
|
import org.springframework.security.oauth2.server.resource.web.authentication.BearerTokenAuthenticationFilter;
|
||||||
import org.springframework.security.openid.OpenIDAuthenticationFilter;
|
|
||||||
import org.springframework.security.web.DefaultSecurityFilterChain;
|
import org.springframework.security.web.DefaultSecurityFilterChain;
|
||||||
import org.springframework.security.web.access.ExceptionTranslationFilter;
|
import org.springframework.security.web.access.ExceptionTranslationFilter;
|
||||||
import org.springframework.security.web.access.channel.ChannelProcessingFilter;
|
import org.springframework.security.web.access.channel.ChannelProcessingFilter;
|
||||||
|
import org.springframework.security.web.access.intercept.AuthorizationFilter;
|
||||||
import org.springframework.security.web.access.intercept.FilterSecurityInterceptor;
|
import org.springframework.security.web.access.intercept.FilterSecurityInterceptor;
|
||||||
import org.springframework.security.web.authentication.AnonymousAuthenticationFilter;
|
import org.springframework.security.web.authentication.AnonymousAuthenticationFilter;
|
||||||
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
|
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
|
||||||
|
@ -38,7 +38,11 @@ import org.springframework.security.web.authentication.rememberme.RememberMeAuth
|
||||||
import org.springframework.security.web.authentication.switchuser.SwitchUserFilter;
|
import org.springframework.security.web.authentication.switchuser.SwitchUserFilter;
|
||||||
import org.springframework.security.web.authentication.www.BasicAuthenticationFilter;
|
import org.springframework.security.web.authentication.www.BasicAuthenticationFilter;
|
||||||
import org.springframework.security.web.authentication.www.DigestAuthenticationFilter;
|
import org.springframework.security.web.authentication.www.DigestAuthenticationFilter;
|
||||||
|
import org.springframework.security.web.context.SecurityContextHolderFilter;
|
||||||
import org.springframework.security.web.context.SecurityContextPersistenceFilter;
|
import org.springframework.security.web.context.SecurityContextPersistenceFilter;
|
||||||
|
import org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter;
|
||||||
|
import org.springframework.security.web.csrf.CsrfFilter;
|
||||||
|
import org.springframework.security.web.header.HeaderWriterFilter;
|
||||||
import org.springframework.security.web.jaasapi.JaasApiIntegrationFilter;
|
import org.springframework.security.web.jaasapi.JaasApiIntegrationFilter;
|
||||||
import org.springframework.security.web.savedrequest.RequestCacheAwareFilter;
|
import org.springframework.security.web.savedrequest.RequestCacheAwareFilter;
|
||||||
import org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter;
|
import org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter;
|
||||||
|
@ -46,6 +50,7 @@ import org.springframework.security.web.session.ConcurrentSessionFilter;
|
||||||
import org.springframework.security.web.session.DisableEncodeUrlFilter;
|
import org.springframework.security.web.session.DisableEncodeUrlFilter;
|
||||||
import org.springframework.security.web.session.ForceEagerSessionCreationFilter;
|
import org.springframework.security.web.session.ForceEagerSessionCreationFilter;
|
||||||
import org.springframework.security.web.session.SessionManagementFilter;
|
import org.springframework.security.web.session.SessionManagementFilter;
|
||||||
|
import org.springframework.web.filter.CorsFilter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param <H>
|
* @param <H>
|
||||||
|
@ -127,17 +132,25 @@ public interface HttpSecurityBuilder<H extends HttpSecurityBuilder<H>>
|
||||||
* The ordering of the Filters is:
|
* The ordering of the Filters is:
|
||||||
*
|
*
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>{@link ForceEagerSessionCreationFilter}</li>
|
|
||||||
* <li>{@link DisableEncodeUrlFilter}</li>
|
* <li>{@link DisableEncodeUrlFilter}</li>
|
||||||
|
* <li>{@link ForceEagerSessionCreationFilter}</li>
|
||||||
* <li>{@link ChannelProcessingFilter}</li>
|
* <li>{@link ChannelProcessingFilter}</li>
|
||||||
|
* <li>{@link WebAsyncManagerIntegrationFilter}</li>
|
||||||
|
* <li>{@link SecurityContextHolderFilter}</li>
|
||||||
* <li>{@link SecurityContextPersistenceFilter}</li>
|
* <li>{@link SecurityContextPersistenceFilter}</li>
|
||||||
|
* <li>{@link HeaderWriterFilter}</li>
|
||||||
|
* <li>{@link CorsFilter}</li>
|
||||||
|
* <li>{@link CsrfFilter}</li>
|
||||||
* <li>{@link LogoutFilter}</li>
|
* <li>{@link LogoutFilter}</li>
|
||||||
|
* <li>{@link org.springframework.security.oauth2.client.web.OAuth2AuthorizationRequestRedirectFilter}</li>
|
||||||
|
* <li>{@link org.springframework.security.saml2.provider.service.web.Saml2WebSsoAuthenticationRequestFilter}</li>
|
||||||
* <li>{@link X509AuthenticationFilter}</li>
|
* <li>{@link X509AuthenticationFilter}</li>
|
||||||
* <li>{@link AbstractPreAuthenticatedProcessingFilter}</li>
|
* <li>{@link AbstractPreAuthenticatedProcessingFilter}</li>
|
||||||
* <li><a href="
|
* <li><a href="
|
||||||
* {@docRoot}/org/springframework/security/cas/web/CasAuthenticationFilter.html">CasAuthenticationFilter</a></li>
|
* {@docRoot}/org/springframework/security/cas/web/CasAuthenticationFilter.html">CasAuthenticationFilter</a></li>
|
||||||
|
* <li>{@link org.springframework.security.oauth2.client.web.OAuth2LoginAuthenticationFilter}</li>
|
||||||
|
* <li>{@link org.springframework.security.saml2.provider.service.web.authentication.Saml2WebSsoAuthenticationFilter}</li>
|
||||||
* <li>{@link UsernamePasswordAuthenticationFilter}</li>
|
* <li>{@link UsernamePasswordAuthenticationFilter}</li>
|
||||||
* <li>{@link OpenIDAuthenticationFilter}</li>
|
|
||||||
* <li>{@link org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter}</li>
|
* <li>{@link org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter}</li>
|
||||||
* <li>{@link org.springframework.security.web.authentication.ui.DefaultLogoutPageGeneratingFilter}</li>
|
* <li>{@link org.springframework.security.web.authentication.ui.DefaultLogoutPageGeneratingFilter}</li>
|
||||||
* <li>{@link ConcurrentSessionFilter}</li>
|
* <li>{@link ConcurrentSessionFilter}</li>
|
||||||
|
@ -149,9 +162,11 @@ public interface HttpSecurityBuilder<H extends HttpSecurityBuilder<H>>
|
||||||
* <li>{@link JaasApiIntegrationFilter}</li>
|
* <li>{@link JaasApiIntegrationFilter}</li>
|
||||||
* <li>{@link RememberMeAuthenticationFilter}</li>
|
* <li>{@link RememberMeAuthenticationFilter}</li>
|
||||||
* <li>{@link AnonymousAuthenticationFilter}</li>
|
* <li>{@link AnonymousAuthenticationFilter}</li>
|
||||||
|
* <li>{@link org.springframework.security.oauth2.client.web.OAuth2AuthorizationCodeGrantFilter}</li>
|
||||||
* <li>{@link SessionManagementFilter}</li>
|
* <li>{@link SessionManagementFilter}</li>
|
||||||
* <li>{@link ExceptionTranslationFilter}</li>
|
* <li>{@link ExceptionTranslationFilter}</li>
|
||||||
* <li>{@link FilterSecurityInterceptor}</li>
|
* <li>{@link FilterSecurityInterceptor}</li>
|
||||||
|
* <li>{@link AuthorizationFilter}</li>
|
||||||
* <li>{@link SwitchUserFilter}</li>
|
* <li>{@link SwitchUserFilter}</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
* @param filter the {@link Filter} to add
|
* @param filter the {@link Filter} to add
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2021 the original author or authors.
|
* Copyright 2002-2024 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -97,7 +97,6 @@ final class FilterOrderRegistration {
|
||||||
order.next());
|
order.next());
|
||||||
put(UsernamePasswordAuthenticationFilter.class, order.next());
|
put(UsernamePasswordAuthenticationFilter.class, order.next());
|
||||||
order.next(); // gh-8105
|
order.next(); // gh-8105
|
||||||
this.filterToOrder.put("org.springframework.security.openid.OpenIDAuthenticationFilter", order.next());
|
|
||||||
put(DefaultLoginPageGeneratingFilter.class, order.next());
|
put(DefaultLoginPageGeneratingFilter.class, order.next());
|
||||||
put(DefaultLogoutPageGeneratingFilter.class, order.next());
|
put(DefaultLogoutPageGeneratingFilter.class, order.next());
|
||||||
put(ConcurrentSessionFilter.class, order.next());
|
put(ConcurrentSessionFilter.class, order.next());
|
||||||
|
|
Loading…
Reference in New Issue