Deprecated API
Contents
-
Terminally Deprecated ElementsElementDescriptionPermit access to the
DispatcherType
instead.@Configuration @EnableWebSecurity public class SecurityConfig { @Bean public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { http .authorizeHttpRequests((authorize) -> authorize .dispatcherTypeMatchers(DispatcherType.ERROR).permitAll() // ... ); return http.build(); } }
This existed for an old IE bug and is no longer need.This existed for an old IE bug and is no longer need.This is deprecated for removal. Users can compareDefaultSavedRequest.getRedirectUrl()
to theHttpServletRequest
URL instead.Please usePathPatternRequestMatcher
insteadplease usePathPatternRequestMatcher
insteadLobHandler
is deprecated without replacement, as such this method will also be removed without replacement
-
Deprecated InterfacesInterfaceDescriptionno replacement is planned, though consider using a custom
RequestMatcher
for any sophisticated decision-makingplease useHttpsRedirectFilter
and its associatedPortMapper
no replacement is planned, though consider using a customRequestMatcher
for any sophisticated decision-makingIn modern Spring Security APIs, each API manages its own configuration context. As such there is no direct replacement for this interface. In the case of method security, please seeSecurityAnnotationScanner
andAuthorizationManager
. In the case of channel security, please seeHttpsRedirectFilter
. In the case of web security, please seeAuthorizationManager
.ALLOW-FROM is an obsolete directive that no longer works in modern browsers. Instead use Content-Security-Policy with the frame-ancestors directive.This existed for an old IE bug and is no longer need.
-
Deprecated ClassesClassDescriptionplease use
HttpsRedirectFilter
and its associatedPortMapper
no replacement is planned, though consider using a customRequestMatcher
for any sophisticated decision-makingno replacement is planned, though consider using a customRequestMatcher
for any sophisticated decision-makingplease useHttpsRedirectFilter
and its associatedPortMapper
please useHttpsRedirectFilter
and its associatedPortMapper
no replacement is planned, though consider using a customRequestMatcher
for any sophisticated decision-makingIn modern Spring Security APIs, each API manages its own configuration context. As such there is no direct replacement for this interface. In the case of method security, please seeSecurityAnnotationScanner
andAuthorizationManager
. In the case of channel security, please seeHttpsRedirectFilter
. In the case of web security, please seeAuthorizationManager
.UseWebExpressionAuthorizationManager
insteadplease usePathPatternRequestTransformer
insteadIn modern Spring Security APIs, each API manages its own configuration context. As such there is no direct replacement for this interface. In the case of method security, please seeSecurityAnnotationScanner
andAuthorizationManager
. In the case of channel security, please seeHttpsRedirectFilter
. In the case of web security, please seeAuthorizationManager
.UseAuthorizationFilter
insteadplease useAuthorizationManagerWebInvocationPrivilegeEvaluator
and adapt any delegateWebInvocationPrivilegeEvaluator
s intoAuthorizationManager
sUseAuthenticationPrincipalArgumentResolver
instead.ALLOW-FROM is an obsolete directive that no longer works in modern browsers. Instead use Content-Security-Policy with the frame-ancestors directive.ALLOW-FROM is an obsolete directive that no longer works in modern browsers. Instead use Content-Security-Policy with the frame-ancestors directive.ALLOW-FROM is an obsolete directive that no longer works in modern browsers. Instead use Content-Security-Policy with the frame-ancestors directive.ALLOW-FROM is an obsolete directive that no longer works in modern browsers. Instead use Content-Security-Policy with the frame-ancestors directive.see Certificate and Public Key Pinning for more contextThis existed for an old IE bug and is no longer need.useServerFormLoginAuthenticationConverter
instead.UseServerHttpBasicAuthenticationConverter
instead.Please usePathPatternRequestMatcher
insteadplease usePathPatternRequestMatcher
instead
-
Deprecated Annotation InterfacesAnnotation InterfaceDescriptionUse
AuthenticationPrincipal
instead.
-
Deprecated MethodsMethodDescriptionPermit access to the
DispatcherType
instead.@Configuration @EnableWebSecurity public class SecurityConfig { @Bean public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { http .authorizeHttpRequests((authorize) -> authorize .dispatcherTypeMatchers(DispatcherType.ERROR).permitAll() // ... ); return http.build(); } }
please useAuthorizationManager.authorize(Supplier, Object)
insteadUseStrictHttpFirewall.getEncodedUrlBlocklist()
insteadThis is deprecated for removal. Users can compareDefaultSavedRequest.getRedirectUrl()
to theHttpServletRequest
URL instead.As of 5.1 in favor ofAuthenticationWebFilter.setServerAuthenticationConverter(ServerAuthenticationConverter)
please useReactiveAuthorizationManager.authorize(Mono, Object)
insteadorg.springframework.security.web.server.csrf.CookieServerCsrfTokenRepository.setCookieDomain(String) LobHandler
is deprecated without replacement, as such this method will also be removed without replacement
-
Deprecated ConstructorsConstructorDescriptionALLOW-FROM is an obsolete directive that no longer works in modern browsers. Instead use Content-Security-Policy with the frame-ancestors directive.
-
Deprecated Enum ConstantsEnum ConstantDescriptionALLOW-FROM is an obsolete directive that no longer works in modern browsers. Instead use Content-Security-Policy with the frame-ancestors directive.
PathPatternRequestTransformer
instead