Deprecated API
Contents
-
InterfaceDescriptionUse
OAuth2TokenIntrospectionClaimNames
insteadThe OpenID 1.0 and 2.0 protocols have been deprecated and users are encouraged to migrate to OpenID Connect, which is supported byspring-security-oauth2
.The OpenID 1.0 and 2.0 protocols have been deprecated and users are encouraged to migrate to OpenID Connect, which is supported byspring-security-oauth2
.UseSaml2ErrorCodes
insteadALLOW-FROM is an obsolete directive that no longer works in modern browsers. Instead use Content-Security-Policy with the frame-ancestors directive.
-
ClassDescriptionorg.springframework.security.config.annotation.web.configurers.oauth2.client.ImplicitGrantConfigurerIt is not recommended to use the implicit flow due to the inherent risks of returning access tokens in an HTTP redirect without any confirmation that it has been received by the client. See reference OAuth 2.0 Implicit Grant.The OpenID 1.0 and 2.0 protocols have been deprecated and users are encouraged to migrate to OpenID Connect, which is supported by
spring-security-oauth2
.org.springframework.security.config.annotation.web.servlet.configuration.WebMvcSecurityConfigurationThis is applied internally using SpringWebMvcImportSelectorUse java.util.Base64Digest based password encoding is not considered secure. Instead use an adaptive one way function like BCryptPasswordEncoder, Pbkdf2PasswordEncoder, or SCryptPasswordEncoder. Even better useDelegatingPasswordEncoder
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.Digest based password encoding is not considered secure. Instead use an adaptive one way function like BCryptPasswordEncoder, Pbkdf2PasswordEncoder, or SCryptPasswordEncoder. Even better useDelegatingPasswordEncoder
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.Digest based password encoding is not considered secure. Instead use an adaptive one way function like BCryptPasswordEncoder, Pbkdf2PasswordEncoder, or SCryptPasswordEncoder. Even better useDelegatingPasswordEncoder
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.This PasswordEncoder is not secure. Instead use an adaptive one way function like BCryptPasswordEncoder, Pbkdf2PasswordEncoder, or SCryptPasswordEncoder. Even better useDelegatingPasswordEncoder
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.Digest based password encoding is not considered secure. Instead use an adaptive one way function like BCryptPasswordEncoder, Pbkdf2PasswordEncoder, or SCryptPasswordEncoder. Even better useDelegatingPasswordEncoder
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.UseUnboundIdContainer
instead because ApacheDS 1.x is no longer supported with no GA version to replace it.It is recommended to use a delegation-based strategy of anOAuth2UserService
to support customOAuth2User
types, as it provides much greater flexibility compared to this implementation. See the reference manual for details on how to implement.UseDefaultMapOAuth2AccessTokenResponseConverter
insteadUseDefaultOAuth2AccessTokenResponseMapConverter
insteadUseNimbusJwtDecoder
orJwtDecoders
insteadThe OpenID 1.0 and 2.0 protocols have been deprecated and users are encouraged to migrate to OpenID Connect, which is supported byspring-security-oauth2
.The OpenID 1.0 and 2.0 protocols have been deprecated and users are encouraged to migrate to OpenID Connect, which is supported byspring-security-oauth2
.The OpenID 1.0 and 2.0 protocols have been deprecated and users are encouraged to migrate to OpenID Connect, which is supported byspring-security-oauth2
.The OpenID 1.0 and 2.0 protocols have been deprecated and users are encouraged to migrate to OpenID Connect, which is supported byspring-security-oauth2
.The OpenID 1.0 and 2.0 protocols have been deprecated and users are encouraged to migrate to OpenID Connect, which is supported byspring-security-oauth2
.The OpenID 1.0 and 2.0 protocols have been deprecated and users are encouraged to migrate to OpenID Connect, which is supported byspring-security-oauth2
.The OpenID 1.0 and 2.0 protocols have been deprecated and users are encouraged to migrate to OpenID Connect, which is supported byspring-security-oauth2
.Basic Authentication did not evolve into a standard. Use Simple Authentication instead.Basic Authentication did not evolve into a standard. useSimpleAuthenticationEncoder
UseSaml2X509Credential
insteadUseSaml2Error
insteadUseRelyingPartyRegistration.AssertingPartyDetails
insteadUseAuthenticationPrincipalArgumentResolver
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.useServerFormLoginAuthenticationConverter
instead.UseServerHttpBasicAuthenticationConverter
instead.
-
Enum ClassDescriptionThe OpenID 1.0 and 2.0 protocols have been deprecated and users are encouraged to migrate to OpenID Connect, which is supported by
spring-security-oauth2
.UseSaml2X509Credential.Saml2X509CredentialType
instead
-
ExceptionsDescriptionThe OpenID 1.0 and 2.0 protocols have been deprecated and users are encouraged to migrate to OpenID Connect, which is supported by
spring-security-oauth2
.The OpenID 1.0 and 2.0 protocols have been deprecated and users are encouraged to migrate to OpenID Connect, which is supported byspring-security-oauth2
.
-
Annotation InterfaceDescriptionuse @{code org.springframework.security.core.parameters.P}Use EnableWebSecurity instead which will automatically add the Spring MVC related Security items.Use
AuthenticationPrincipal
instead.
-
FieldDescriptionsince 5.4 in favor of
AbstractMessageMatcherComposite.logger
This field should no longer be usedThis field should no longer be useduseOAuth2TokenIntrospectionClaimNames.AUD
insteaduseOAuth2TokenIntrospectionClaimNames.EXP
insteaduseOAuth2TokenIntrospectionClaimNames.IAT
insteaduseOAuth2TokenIntrospectionClaimNames.ISS
insteaduseOAuth2TokenIntrospectionClaimNames.NBF
insteaduseOAuth2TokenIntrospectionClaimNames.SUB
insteadBasic did not evolve into the standard. Instead use Simple Authentication MimeTypeUtils.parseMimeType(WellKnownMimeType.MESSAGE_RSOCKET_AUTHENTICATION.getString())Basic did not evolve into the standard. Instead use Simple Authentication MimeTypeUtils.parseMimeType(WellKnownMimeType.MESSAGE_RSOCKET_AUTHENTICATION.getString())
-
MethodDescriptionThe OpenID 1.0 and 2.0 protocols have been deprecated and users are encouraged to migrate to OpenID Connect, which is supported by
spring-security-oauth2
.The OpenID 1.0 and 2.0 protocols have been deprecated and users are encouraged to migrate to OpenID Connect, which is supported byspring-security-oauth2
.UseHeadersConfigurer.permissionsPolicy(Customizer)
instead.SeeCustomUserTypesOAuth2UserService
for alternative usage.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.This encryptor is not secure. Instead, look to your data store for a mechanism to query encrypted data.UseClientRegistration.Builder.redirectUri(String)
insteadUseClientRegistration.getRedirectUri()
insteadUseOAuth2AuthorizedClientArgumentResolver(OAuth2AuthorizedClientManager)
instead. Create an instance ofClientCredentialsOAuth2AuthorizedClientProvider
configured with aDefaultClientCredentialsTokenResponseClient
(or a custom one) and than supply it toDefaultOAuth2AuthorizedClientManager
.TheaccessTokenExpiresSkew
should be configured with the specificReactiveOAuth2AuthorizedClientProvider
implementation, e.g.ClientCredentialsReactiveOAuth2AuthorizedClientProvider
orRefreshTokenReactiveOAuth2AuthorizedClientProvider
.UseServerOAuth2AuthorizedClientExchangeFilterFunction(ReactiveOAuth2AuthorizedClientManager)
instead. Create an instance ofClientCredentialsReactiveOAuth2AuthorizedClientProvider
configured with aWebClientReactiveClientCredentialsTokenResponseClient
(or a custom one) and than supply it toDefaultReactiveOAuth2AuthorizedClientManager
.TheaccessTokenExpiresSkew
should be configured with the specificOAuth2AuthorizedClientProvider
implementation, e.g.ClientCredentialsOAuth2AuthorizedClientProvider
orRefreshTokenOAuth2AuthorizedClientProvider
.UseServletOAuth2AuthorizedClientExchangeFilterFunction(OAuth2AuthorizedClientManager)
instead. Create an instance ofClientCredentialsOAuth2AuthorizedClientProvider
configured with aDefaultClientCredentialsTokenResponseClient
(or a custom one) and than supply it toDefaultOAuth2AuthorizedClientManager
.UseClaimAccessor.hasClaim(java.lang.String)
instead.It is not recommended to use the implicit flow due to the inherent risks of returning access tokens in an HTTP redirect without any confirmation that it has been received by the client.Since 5.2. Use your own custom converter insteadSince 5.6. UseOAuth2TokenIntrospectionClaimAccessor.getScopes()
insteadUseSaml2AuthenticationException.getSaml2Error()
insteadplease useSaml2AuthenticationRequestFactory.createRedirectAuthenticationRequest(Saml2AuthenticationRequestContext)
orSaml2AuthenticationRequestFactory.createPostAuthenticationRequest(Saml2AuthenticationRequestContext)
This method will be removed in future versions of Spring SecurityUsegetRelyingPartyRegistration().getAssertingPartyDetails().getEntityId()
insteadUsegetRelyingPartyRegistration().getEntityId()
insteadUsegetRelyingPartyRegistration().getAssertionConsumerServiceLocation()
insteadGet the credentials throughSaml2AuthenticationToken.getRelyingPartyRegistration()
insteadUseRelyingPartyRegistration.Builder.assertionConsumerServiceLocation
instead.UseRelyingPartyRegistration.Builder.signingX509Credentials
orRelyingPartyRegistration.Builder.decryptionX509Credentials
instead for relying party keys orRelyingPartyRegistration.AssertingPartyDetails.Builder.verificationX509Credentials
orRelyingPartyRegistration.AssertingPartyDetails.Builder.encryptionX509Credentials
for asserting party keysuse#assertingPartyDetails(Consumer<AssertingPartyDetails.Builder >)
UseRelyingPartyRegistration.Builder.entityId
insteaduse#assertingPartyDetails(Consumer<AssertingPartyDetails.Builder >)
Instead of retrieving all credentials, use the appropriate method for obtaining the correct typeUseRelyingPartyRegistration.getEntityId()
insteadUse {code #getAssertingPartyDetails().getSigningX509Credentials()} insteaduse the constructor insteadUseStrictHttpFirewall.getEncodedUrlBlocklist()
insteadAs of 5.1 in favor ofAuthenticationWebFilter.setServerAuthenticationConverter(ServerAuthenticationConverter)
-
ConstructorDescriptionUse
Saml2Error
constructor insteadUseSaml2Error
constructor insteadUseSaml2Error
constructor insteadUseSaml2Error
constructor insteaduse the constructor that takes aSaml2AuthenticationRequestFactory
ALLOW-FROM is an obsolete directive that no longer works in modern browsers. Instead use Content-Security-Policy with the frame-ancestors directive.
-
Enum ConstantDescriptionALLOW-FROM is an obsolete directive that no longer works in modern browsers. Instead use Content-Security-Policy with the frame-ancestors directive.
OAuth2TokenIntrospectionClaimAccessor
instead