public final class InMemoryReactiveOAuth2AuthorizedClientService extends java.lang.Object implements ReactiveOAuth2AuthorizedClientService
OAuth2AuthorizedClientService that stores Authorized Client(s) in-memory.OAuth2AuthorizedClientService,
OAuth2AuthorizedClient,
ClientRegistration,
Authentication| Constructor and Description |
|---|
InMemoryReactiveOAuth2AuthorizedClientService(ReactiveClientRegistrationRepository clientRegistrationRepository)
Constructs an
InMemoryReactiveOAuth2AuthorizedClientService using the
provided parameters. |
| Modifier and Type | Method and Description |
|---|---|
<T extends OAuth2AuthorizedClient> |
loadAuthorizedClient(java.lang.String clientRegistrationId,
java.lang.String principalName)
Returns the
OAuth2AuthorizedClient associated to the provided client
registration identifier and End-User's Principal name or null if
not available. |
reactor.core.publisher.Mono<java.lang.Void> |
removeAuthorizedClient(java.lang.String clientRegistrationId,
java.lang.String principalName)
Removes the
OAuth2AuthorizedClient associated to the provided client
registration identifier and End-User's Principal name. |
reactor.core.publisher.Mono<java.lang.Void> |
saveAuthorizedClient(OAuth2AuthorizedClient authorizedClient,
org.springframework.security.core.Authentication principal)
Saves the
OAuth2AuthorizedClient associating it to the provided End-User
Authentication (Resource Owner). |
public InMemoryReactiveOAuth2AuthorizedClientService(ReactiveClientRegistrationRepository clientRegistrationRepository)
InMemoryReactiveOAuth2AuthorizedClientService using the
provided parameters.clientRegistrationRepository - the repository of client registrationspublic <T extends OAuth2AuthorizedClient> reactor.core.publisher.Mono<T> loadAuthorizedClient(java.lang.String clientRegistrationId, java.lang.String principalName)
ReactiveOAuth2AuthorizedClientServiceOAuth2AuthorizedClient associated to the provided client
registration identifier and End-User's Principal name or null if
not available.loadAuthorizedClient in interface ReactiveOAuth2AuthorizedClientServiceT - a type of OAuth2AuthorizedClientclientRegistrationId - the identifier for the client's registrationprincipalName - the name of the End-User Principal (Resource Owner)OAuth2AuthorizedClient or null if not availablepublic reactor.core.publisher.Mono<java.lang.Void> saveAuthorizedClient(OAuth2AuthorizedClient authorizedClient, org.springframework.security.core.Authentication principal)
ReactiveOAuth2AuthorizedClientServiceOAuth2AuthorizedClient associating it to the provided End-User
Authentication (Resource Owner).saveAuthorizedClient in interface ReactiveOAuth2AuthorizedClientServiceauthorizedClient - the authorized clientprincipal - the End-User Authentication (Resource Owner)public reactor.core.publisher.Mono<java.lang.Void> removeAuthorizedClient(java.lang.String clientRegistrationId,
java.lang.String principalName)
ReactiveOAuth2AuthorizedClientServiceOAuth2AuthorizedClient associated to the provided client
registration identifier and End-User's Principal name.removeAuthorizedClient in interface ReactiveOAuth2AuthorizedClientServiceclientRegistrationId - the identifier for the client's registrationprincipalName - the name of the End-User Principal (Resource Owner)