Skip navigation links
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Index
  • Help

Deprecated API

Contents

  • Interfaces
  • Classes
  • Annotation Interfaces
  • Fields
  • Methods
  • Constructors
  • Enum Constants
  • Deprecated Interfaces
    Interface
    Description
    org.springframework.security.access.intercept.aspectj.AspectJCallback
    This class will be removed from the public API. Please either use `spring-security-aspects`, Spring Security's method security support or create your own class that uses Spring AOP annotations.
    org.springframework.security.messaging.access.intercept.MessageSecurityMetadataSource
    Use MessageMatcherDelegatingAuthorizationManager instead
    org.springframework.security.web.header.writers.frameoptions.AllowFromStrategy
    ALLOW-FROM is an obsolete directive that no longer works in modern browsers. Instead use Content-Security-Policy with the frame-ancestors directive.
    org.springframework.security.web.util.matcher.RequestVariablesExtractor
    use RequestMatcher.MatchResult from RequestMatcher.matcher(HttpServletRequest)
  • Deprecated Classes
    Class
    Description
    org.springframework.security.access.intercept.aspectj.AspectJMethodSecurityInterceptor
    This class will be removed from the public API. Please either use `spring-security-aspects`, Spring Security's method security support or create your own class that uses Spring AOP annotations.
    org.springframework.security.access.intercept.aspectj.MethodInvocationAdapter
    This class will be removed from the public API. See `JoinPointMethodInvocation` in `spring-security-aspects` for its replacement
    org.springframework.security.access.prepost.PrePostAdviceReactiveMethodInterceptor
    Use AuthorizationManagerBeforeReactiveMethodInterceptor or AuthorizationManagerAfterReactiveMethodInterceptor
    org.springframework.security.authorization.method.ExpressionAttributeAuthorizationDecision
    Use ExpressionAuthorizationDecision instead
    org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
    Use a SecurityFilterChain Bean to configure HttpSecurity or a WebSecurityCustomizer Bean to configure WebSecurity
    org.springframework.security.config.annotation.web.messaging.MessageSecurityMetadataSourceRegistry
    Use MessageMatcherDelegatingAuthorizationManager instead
    org.springframework.security.config.annotation.web.servlet.configuration.WebMvcSecurityConfiguration
    This is applied internally using SpringWebMvcImportSelector
    org.springframework.security.config.annotation.web.socket.AbstractSecurityWebSocketMessageBrokerConfigurer
    Use EnableWebSocketSecurity instead
    org.springframework.security.crypto.codec.Base64
    Use java.util.Base64
    org.springframework.security.crypto.password.LdapShaPasswordEncoder
    Digest based password encoding is not considered secure. Instead use an adaptive one way function like BCryptPasswordEncoder, Pbkdf2PasswordEncoder, or SCryptPasswordEncoder. Even better use DelegatingPasswordEncoder which supports password upgrades. There are no plans to remove this support. It is deprecated to indicate that this is a legacy implementation and using it is considered insecure.
    org.springframework.security.crypto.password.Md4PasswordEncoder
    Digest based password encoding is not considered secure. Instead use an adaptive one way function like BCryptPasswordEncoder, Pbkdf2PasswordEncoder, or SCryptPasswordEncoder. Even better use DelegatingPasswordEncoder which supports password upgrades. There are no plans to remove this support. It is deprecated to indicate that this is a legacy implementation and using it is considered insecure.
    org.springframework.security.crypto.password.MessageDigestPasswordEncoder
    Digest based password encoding is not considered secure. Instead use an adaptive one way function like BCryptPasswordEncoder, Pbkdf2PasswordEncoder, or SCryptPasswordEncoder. Even better use DelegatingPasswordEncoder which supports password upgrades. There are no plans to remove this support. It is deprecated to indicate that this is a legacy implementation and using it is considered insecure.
    org.springframework.security.crypto.password.NoOpPasswordEncoder
    This PasswordEncoder is not secure. Instead use an adaptive one way function like BCryptPasswordEncoder, Pbkdf2PasswordEncoder, or SCryptPasswordEncoder. Even better use DelegatingPasswordEncoder which supports password upgrades. There are no plans to remove this support. It is deprecated to indicate that this is a legacy implementation and using it is considered insecure.
    org.springframework.security.crypto.password.StandardPasswordEncoder
    Digest based password encoding is not considered secure. Instead use an adaptive one way function like BCryptPasswordEncoder, Pbkdf2PasswordEncoder, or SCryptPasswordEncoder. Even better use DelegatingPasswordEncoder which supports password upgrades. There are no plans to remove this support. It is deprecated to indicate that this is a legacy implementation and using it is considered insecure.
    org.springframework.security.ldap.server.ApacheDSContainer
    Use UnboundIdContainer instead because ApacheDS 1.x is no longer supported with no GA version to replace it.
    org.springframework.security.messaging.access.expression.ExpressionBasedMessageSecurityMetadataSourceFactory
    Use MessageMatcherDelegatingAuthorizationManager instead
    org.springframework.security.messaging.access.expression.MessageExpressionVoter
    Use MessageMatcherDelegatingAuthorizationManager instead
    org.springframework.security.messaging.access.intercept.ChannelSecurityInterceptor
    Use AuthorizationChannelInterceptor instead
    org.springframework.security.messaging.access.intercept.DefaultMessageSecurityMetadataSource
    Use MessageMatcherDelegatingAuthorizationManager instead
    org.springframework.security.oauth2.client.endpoint.DefaultPasswordTokenResponseClient
    The latest OAuth 2.0 Security Best Current Practice disallows the use of the Resource Owner Password Credentials grant. See reference OAuth 2.0 Security Best Current Practice.
    org.springframework.security.oauth2.client.endpoint.OAuth2PasswordGrantRequest
    The latest OAuth 2.0 Security Best Current Practice disallows the use of the Resource Owner Password Credentials grant. See reference OAuth 2.0 Security Best Current Practice.
    org.springframework.security.oauth2.client.endpoint.WebClientReactivePasswordTokenResponseClient
    The latest OAuth 2.0 Security Best Current Practice disallows the use of the Resource Owner Password Credentials grant. See reference OAuth 2.0 Security Best Current Practice.
    org.springframework.security.oauth2.client.PasswordOAuth2AuthorizedClientProvider
    The latest OAuth 2.0 Security Best Current Practice disallows the use of the Resource Owner Password Credentials grant. See reference OAuth 2.0 Security Best Current Practice.
    org.springframework.security.oauth2.client.PasswordReactiveOAuth2AuthorizedClientProvider
    The latest OAuth 2.0 Security Best Current Practice disallows the use of the Resource Owner Password Credentials grant. See reference OAuth 2.0 Security Best Current Practice.
    org.springframework.security.rsocket.metadata.BasicAuthenticationDecoder
    Basic Authentication did not evolve into a standard. Use Simple Authentication instead.
    org.springframework.security.rsocket.metadata.BasicAuthenticationEncoder
    Basic Authentication did not evolve into a standard. use SimpleAuthenticationEncoder
    org.springframework.security.web.bind.support.AuthenticationPrincipalArgumentResolver
    Use AuthenticationPrincipalArgumentResolver instead.
    org.springframework.security.web.context.HttpRequestResponseHolder
    Use SecurityContextRepository.loadContext(HttpServletRequest)
    org.springframework.security.web.context.SaveContextOnUpdateOrErrorResponseWrapper
    Use SecurityContextRepository.loadContext(HttpServletRequest) instead.
    org.springframework.security.web.context.SecurityContextPersistenceFilter
    Use SecurityContextHolderFilter
    org.springframework.security.web.header.writers.frameoptions.AbstractRequestParameterAllowFromStrategy
    ALLOW-FROM is an obsolete directive that no longer works in modern browsers. Instead use Content-Security-Policy with the frame-ancestors directive.
    org.springframework.security.web.header.writers.frameoptions.RegExpAllowFromStrategy
    ALLOW-FROM is an obsolete directive that no longer works in modern browsers. Instead use Content-Security-Policy with the frame-ancestors directive.
    org.springframework.security.web.header.writers.frameoptions.StaticAllowFromStrategy
    ALLOW-FROM is an obsolete directive that no longer works in modern browsers. Instead use Content-Security-Policy with the frame-ancestors directive.
    org.springframework.security.web.header.writers.frameoptions.WhiteListedAllowFromStrategy
    ALLOW-FROM is an obsolete directive that no longer works in modern browsers. Instead use Content-Security-Policy with the frame-ancestors directive.
    org.springframework.security.web.server.ServerFormLoginAuthenticationConverter
    use ServerFormLoginAuthenticationConverter instead.
    org.springframework.security.web.server.ServerHttpBasicAuthenticationConverter
    Use ServerHttpBasicAuthenticationConverter instead.
  • Deprecated Annotation Interfaces
    Annotation Interface
    Description
    org.springframework.security.access.method.P
    use @{code org.springframework.security.core.parameters.P}
    org.springframework.security.config.annotation.web.servlet.configuration.EnableWebMvcSecurity
    Use EnableWebSecurity instead which will automatically add the Spring MVC related Security items.
    org.springframework.security.web.bind.annotation.AuthenticationPrincipal
    Use AuthenticationPrincipal instead.
  • Deprecated Fields
    Field
    Description
    org.springframework.security.messaging.util.matcher.AbstractMessageMatcherComposite.LOGGER
    since 5.4 in favor of AbstractMessageMatcherComposite.logger
    org.springframework.security.oauth2.core.AuthorizationGrantType.PASSWORD
    The latest OAuth 2.0 Security Best Current Practice disallows the use of the Resource Owner Password Credentials grant. See reference OAuth 2.0 Security Best Current Practice.
    org.springframework.security.rsocket.metadata.BearerTokenMetadata.BEARER_AUTHENTICATION_MIME_TYPE
    Basic did not evolve into the standard. Instead use Simple Authentication MimeTypeUtils.parseMimeType(WellKnownMimeType.MESSAGE_RSOCKET_AUTHENTICATION.getString())
    org.springframework.security.rsocket.metadata.UsernamePasswordMetadata.BASIC_AUTHENTICATION_MIME_TYPE
    Basic did not evolve into the standard. Instead use Simple Authentication MimeTypeUtils.parseMimeType(WellKnownMimeType.MESSAGE_RSOCKET_AUTHENTICATION.getString())
  • Deprecated Methods
    Method
    Description
    org.springframework.security.authentication.DefaultAuthenticationEventPublisher.setAdditionalExceptionMappings(Properties)
    use DefaultAuthenticationEventPublisher.setAdditionalExceptionMappings(Map)
    org.springframework.security.config.annotation.rsocket.RSocketSecurity.basicAuthentication(Customizer<RSocketSecurity.BasicAuthenticationSpec>)
    Use RSocketSecurity.simpleAuthentication(Customizer)
    org.springframework.security.config.annotation.web.configurers.HeadersConfigurer.featurePolicy(String)
    Use HeadersConfigurer.permissionsPolicy(Customizer) instead.
    org.springframework.security.config.annotation.web.socket.AbstractSecurityWebSocketMessageBrokerConfigurer.setMessageExpessionHandler(List<SecurityExpressionHandler<Message<Object>>>)
    org.springframework.security.config.web.server.ServerHttpSecurity.HeaderSpec.featurePolicy(String)
    Use ServerHttpSecurity.HeaderSpec.permissionsPolicy(Customizer) instead.
    org.springframework.security.core.userdetails.User.withDefaultPasswordEncoder()
    Using this method is not considered safe for production, but is acceptable for demos and getting started. For production purposes, ensure the password is encoded externally. See the method Javadoc for additional details. There are no plans to remove this support. It is deprecated to indicate that this is considered insecure for production purposes.
    org.springframework.security.oauth2.client.OAuth2AuthorizedClientProviderBuilder.password()
    The latest OAuth 2.0 Security Best Current Practice disallows the use of the Resource Owner Password Credentials grant. See reference OAuth 2.0 Security Best Current Practice.
    org.springframework.security.oauth2.client.OAuth2AuthorizedClientProviderBuilder.password(Consumer<OAuth2AuthorizedClientProviderBuilder.PasswordGrantBuilder>)
    The latest OAuth 2.0 Security Best Current Practice disallows the use of the Resource Owner Password Credentials grant. See reference OAuth 2.0 Security Best Current Practice.
    org.springframework.security.oauth2.client.ReactiveOAuth2AuthorizedClientProviderBuilder.password()
    The latest OAuth 2.0 Security Best Current Practice disallows the use of the Resource Owner Password Credentials grant. See reference OAuth 2.0 Security Best Current Practice.
    org.springframework.security.oauth2.client.ReactiveOAuth2AuthorizedClientProviderBuilder.password(Consumer<ReactiveOAuth2AuthorizedClientProviderBuilder.PasswordGrantBuilder>)
    The latest OAuth 2.0 Security Best Current Practice disallows the use of the Resource Owner Password Credentials grant. See reference OAuth 2.0 Security Best Current Practice.
    org.springframework.security.web.context.SecurityContextRepository.loadContext(HttpRequestResponseHolder)
    Use SecurityContextRepository.loadContext(HttpServletRequest) instead.
    org.springframework.security.web.firewall.StrictHttpFirewall.getEncodedUrlBlacklist()
    Use StrictHttpFirewall.getEncodedUrlBlocklist() instead
    org.springframework.security.web.server.authentication.AuthenticationWebFilter.setAuthenticationConverter(Function<ServerWebExchange, Mono<Authentication>>)
    As of 5.1 in favor of AuthenticationWebFilter.setServerAuthenticationConverter(ServerAuthenticationConverter)
    org.springframework.security.web.server.ServerFormLoginAuthenticationConverter.apply(ServerWebExchange)
    org.springframework.security.web.server.ServerHttpBasicAuthenticationConverter.apply(ServerWebExchange)
    org.springframework.security.web.servlet.util.matcher.MvcRequestMatcher.extractUriTemplateVariables(HttpServletRequest)
    org.springframework.security.web.session.ConcurrentSessionFilter.determineExpiredUrl(HttpServletRequest, SessionInformation)
    Use ConcurrentSessionFilter(SessionRegistry, SessionInformationExpiredStrategy) instead.
    org.springframework.security.web.session.ConcurrentSessionFilter.setRedirectStrategy(RedirectStrategy)
    use ConcurrentSessionFilter(SessionRegistry, SessionInformationExpiredStrategy) instead.
    org.springframework.security.web.util.matcher.AntPathRequestMatcher.extractUriTemplateVariables(HttpServletRequest)
  • Deprecated Constructors
    Constructor
    Description
    org.springframework.security.saml2.provider.service.authentication.AbstractSaml2AuthenticationRequest.Builder()
    Use Builder(RelyingPartyRegistration) instead
    org.springframework.security.web.header.writers.frameoptions.XFrameOptionsHeaderWriter(AllowFromStrategy)
    ALLOW-FROM is an obsolete directive that no longer works in modern browsers. Instead use Content-Security-Policy with the frame-ancestors directive.
    org.springframework.security.web.session.ConcurrentSessionFilter(SessionRegistry, String)
    use ConcurrentSessionFilter(SessionRegistry, SessionInformationExpiredStrategy) with SimpleRedirectSessionInformationExpiredStrategy instead.
  • Deprecated Enum Constants
    Enum Constant
    Description
    org.springframework.security.web.header.writers.frameoptions.XFrameOptionsHeaderWriter.XFrameOptionsMode.ALLOW_FROM
    ALLOW-FROM is an obsolete directive that no longer works in modern browsers. Instead use Content-Security-Policy with the frame-ancestors directive.