Class UnAuthenticatedServerOAuth2AuthorizedClientRepository
java.lang.Object
org.springframework.security.oauth2.client.web.server.UnAuthenticatedServerOAuth2AuthorizedClientRepository
- All Implemented Interfaces:
ServerOAuth2AuthorizedClientRepository
@Deprecated
public class UnAuthenticatedServerOAuth2AuthorizedClientRepository
extends Object
implements ServerOAuth2AuthorizedClientRepository
Deprecated.
Provides support for an unauthenticated user. This is useful when running as a process
with no user associated to it. The implementation ensures that
ServerWebExchange
is null and that the Authentication
is either null or
anonymous to prevent using it incorrectly.- Since:
- 5.1
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T extends OAuth2AuthorizedClient>
reactor.core.publisher.Mono<T>loadAuthorizedClient
(String clientRegistrationId, Authentication authentication, org.springframework.web.server.ServerWebExchange serverWebExchange) Deprecated.Returns theOAuth2AuthorizedClient
associated to the provided client registration identifier and End-UserAuthentication
(Resource Owner) ornull
if not available.reactor.core.publisher.Mono<Void>
removeAuthorizedClient
(String clientRegistrationId, Authentication authentication, org.springframework.web.server.ServerWebExchange serverWebExchange) Deprecated.Removes theOAuth2AuthorizedClient
associated to the provided client registration identifier and End-UserAuthentication
(Resource Owner).reactor.core.publisher.Mono<Void>
saveAuthorizedClient
(OAuth2AuthorizedClient authorizedClient, Authentication authentication, org.springframework.web.server.ServerWebExchange serverWebExchange) Deprecated.Saves theOAuth2AuthorizedClient
associating it to the provided End-UserAuthentication
(Resource Owner).
-
Constructor Details
-
UnAuthenticatedServerOAuth2AuthorizedClientRepository
public UnAuthenticatedServerOAuth2AuthorizedClientRepository()Deprecated.
-
-
Method Details
-
loadAuthorizedClient
public <T extends OAuth2AuthorizedClient> reactor.core.publisher.Mono<T> loadAuthorizedClient(String clientRegistrationId, Authentication authentication, org.springframework.web.server.ServerWebExchange serverWebExchange) Deprecated.Description copied from interface:ServerOAuth2AuthorizedClientRepository
Returns theOAuth2AuthorizedClient
associated to the provided client registration identifier and End-UserAuthentication
(Resource Owner) ornull
if not available.- Specified by:
loadAuthorizedClient
in interfaceServerOAuth2AuthorizedClientRepository
- Type Parameters:
T
- a type of OAuth2AuthorizedClient- Parameters:
clientRegistrationId
- the identifier for the client's registrationauthentication
- the End-UserAuthentication
(Resource Owner)serverWebExchange
- theServerWebExchange
- Returns:
- the
OAuth2AuthorizedClient
ornull
if not available
-
saveAuthorizedClient
public reactor.core.publisher.Mono<Void> saveAuthorizedClient(OAuth2AuthorizedClient authorizedClient, Authentication authentication, org.springframework.web.server.ServerWebExchange serverWebExchange) Deprecated.Description copied from interface:ServerOAuth2AuthorizedClientRepository
Saves theOAuth2AuthorizedClient
associating it to the provided End-UserAuthentication
(Resource Owner).- Specified by:
saveAuthorizedClient
in interfaceServerOAuth2AuthorizedClientRepository
- Parameters:
authorizedClient
- the authorized clientauthentication
- the End-UserAuthentication
(Resource Owner)serverWebExchange
- theServerWebExchange
-
removeAuthorizedClient
public reactor.core.publisher.Mono<Void> removeAuthorizedClient(String clientRegistrationId, Authentication authentication, org.springframework.web.server.ServerWebExchange serverWebExchange) Deprecated.Description copied from interface:ServerOAuth2AuthorizedClientRepository
Removes theOAuth2AuthorizedClient
associated to the provided client registration identifier and End-UserAuthentication
(Resource Owner).- Specified by:
removeAuthorizedClient
in interfaceServerOAuth2AuthorizedClientRepository
- Parameters:
clientRegistrationId
- the identifier for the client's registrationauthentication
- the End-UserAuthentication
(Resource Owner)serverWebExchange
- theServerWebExchange
-
AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager
instead