Interface ServerOAuth2AuthorizedClientRepository
- All Known Implementing Classes:
AuthenticatedPrincipalServerOAuth2AuthorizedClientRepository
,WebSessionServerOAuth2AuthorizedClientRepository
public interface ServerOAuth2AuthorizedClientRepository
Implementations of this interface are responsible for the persistence of
Authorized Client(s)
between requests.
The primary purpose of an Authorized Client
is to
associate an Access Token
credential to
a Client
and Resource Owner, who
is the Principal
that originally
granted the authorization.
- Since:
- 5.1
- See Also:
-
Method Summary
Modifier and TypeMethodDescription<T extends OAuth2AuthorizedClient>
reactor.core.publisher.Mono<T>loadAuthorizedClient
(String clientRegistrationId, Authentication principal, org.springframework.web.server.ServerWebExchange exchange) 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 principal, org.springframework.web.server.ServerWebExchange exchange) Removes theOAuth2AuthorizedClient
associated to the provided client registration identifier and End-UserAuthentication
(Resource Owner).reactor.core.publisher.Mono<Void>
saveAuthorizedClient
(OAuth2AuthorizedClient authorizedClient, Authentication principal, org.springframework.web.server.ServerWebExchange exchange) Saves theOAuth2AuthorizedClient
associating it to the provided End-UserAuthentication
(Resource Owner).
-
Method Details
-
loadAuthorizedClient
<T extends OAuth2AuthorizedClient> reactor.core.publisher.Mono<T> loadAuthorizedClient(String clientRegistrationId, Authentication principal, org.springframework.web.server.ServerWebExchange exchange) Returns theOAuth2AuthorizedClient
associated to the provided client registration identifier and End-UserAuthentication
(Resource Owner) ornull
if not available.- Type Parameters:
T
- a type of OAuth2AuthorizedClient- Parameters:
clientRegistrationId
- the identifier for the client's registrationprincipal
- the End-UserAuthentication
(Resource Owner)exchange
- theServerWebExchange
- Returns:
- the
OAuth2AuthorizedClient
ornull
if not available
-
saveAuthorizedClient
reactor.core.publisher.Mono<Void> saveAuthorizedClient(OAuth2AuthorizedClient authorizedClient, Authentication principal, org.springframework.web.server.ServerWebExchange exchange) Saves theOAuth2AuthorizedClient
associating it to the provided End-UserAuthentication
(Resource Owner).- Parameters:
authorizedClient
- the authorized clientprincipal
- the End-UserAuthentication
(Resource Owner)exchange
- theServerWebExchange
-
removeAuthorizedClient
reactor.core.publisher.Mono<Void> removeAuthorizedClient(String clientRegistrationId, Authentication principal, org.springframework.web.server.ServerWebExchange exchange) Removes theOAuth2AuthorizedClient
associated to the provided client registration identifier and End-UserAuthentication
(Resource Owner).- Parameters:
clientRegistrationId
- the identifier for the client's registrationprincipal
- the End-UserAuthentication
(Resource Owner)exchange
- theServerWebExchange
-