Class InMemoryReactiveOAuth2AuthorizedClientService
java.lang.Object
org.springframework.security.oauth2.client.InMemoryReactiveOAuth2AuthorizedClientService
- All Implemented Interfaces:
ReactiveOAuth2AuthorizedClientService
public final class InMemoryReactiveOAuth2AuthorizedClientService
extends Object
implements ReactiveOAuth2AuthorizedClientService
An
OAuth2AuthorizedClientService that stores Authorized Client(s) in-memory.- Since:
- 5.1
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInMemoryReactiveOAuth2AuthorizedClientService(ReactiveClientRegistrationRepository clientRegistrationRepository) Constructs anInMemoryReactiveOAuth2AuthorizedClientServiceusing the provided parameters. -
Method Summary
Modifier and TypeMethodDescription<T extends OAuth2AuthorizedClient>
reactor.core.publisher.Mono<T>loadAuthorizedClient(String clientRegistrationId, String principalName) Returns theOAuth2AuthorizedClientassociated to the provided client registration identifier and End-User'sPrincipalname ornullif not available.reactor.core.publisher.Mono<Void>removeAuthorizedClient(String clientRegistrationId, String principalName) Removes theOAuth2AuthorizedClientassociated to the provided client registration identifier and End-User'sPrincipalname.reactor.core.publisher.Mono<Void>saveAuthorizedClient(OAuth2AuthorizedClient authorizedClient, Authentication principal) Saves theOAuth2AuthorizedClientassociating it to the provided End-UserAuthentication(Resource Owner).
-
Constructor Details
-
InMemoryReactiveOAuth2AuthorizedClientService
public InMemoryReactiveOAuth2AuthorizedClientService(ReactiveClientRegistrationRepository clientRegistrationRepository) Constructs anInMemoryReactiveOAuth2AuthorizedClientServiceusing the provided parameters.- Parameters:
clientRegistrationRepository- the repository of client registrations
-
-
Method Details
-
loadAuthorizedClient
public <T extends OAuth2AuthorizedClient> reactor.core.publisher.Mono<T> loadAuthorizedClient(String clientRegistrationId, String principalName) Description copied from interface:ReactiveOAuth2AuthorizedClientServiceReturns theOAuth2AuthorizedClientassociated to the provided client registration identifier and End-User'sPrincipalname ornullif not available.- Specified by:
loadAuthorizedClientin interfaceReactiveOAuth2AuthorizedClientService- Type Parameters:
T- a type of OAuth2AuthorizedClient- Parameters:
clientRegistrationId- the identifier for the client's registrationprincipalName- the name of the End-UserPrincipal(Resource Owner)- Returns:
- the
OAuth2AuthorizedClientornullif not available
-
saveAuthorizedClient
public reactor.core.publisher.Mono<Void> saveAuthorizedClient(OAuth2AuthorizedClient authorizedClient, Authentication principal) Description copied from interface:ReactiveOAuth2AuthorizedClientServiceSaves theOAuth2AuthorizedClientassociating it to the provided End-UserAuthentication(Resource Owner).- Specified by:
saveAuthorizedClientin interfaceReactiveOAuth2AuthorizedClientService- Parameters:
authorizedClient- the authorized clientprincipal- the End-UserAuthentication(Resource Owner)
-
removeAuthorizedClient
public reactor.core.publisher.Mono<Void> removeAuthorizedClient(String clientRegistrationId, String principalName) Description copied from interface:ReactiveOAuth2AuthorizedClientServiceRemoves theOAuth2AuthorizedClientassociated to the provided client registration identifier and End-User'sPrincipalname.- Specified by:
removeAuthorizedClientin interfaceReactiveOAuth2AuthorizedClientService- Parameters:
clientRegistrationId- the identifier for the client's registrationprincipalName- the name of the End-UserPrincipal(Resource Owner)
-