Class InMemoryReactiveOAuth2AuthorizedClientService
- java.lang.Object
-
- org.springframework.security.oauth2.client.InMemoryReactiveOAuth2AuthorizedClientService
-
- All Implemented Interfaces:
ReactiveOAuth2AuthorizedClientService
public final class InMemoryReactiveOAuth2AuthorizedClientService extends java.lang.Object implements ReactiveOAuth2AuthorizedClientService
AnOAuth2AuthorizedClientService
that storesAuthorized Client(s)
in-memory.- Since:
- 5.1
- See Also:
OAuth2AuthorizedClientService
,OAuth2AuthorizedClient
,ClientRegistration
,Authentication
-
-
Constructor Summary
Constructors Constructor Description InMemoryReactiveOAuth2AuthorizedClientService(ReactiveClientRegistrationRepository clientRegistrationRepository)
Constructs anInMemoryReactiveOAuth2AuthorizedClientService
using the provided parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends OAuth2AuthorizedClient>
reactor.core.publisher.Mono<T>loadAuthorizedClient(java.lang.String clientRegistrationId, java.lang.String principalName)
Returns theOAuth2AuthorizedClient
associated to the provided client registration identifier and End-User'sPrincipal
name ornull
if not available.reactor.core.publisher.Mono<java.lang.Void>
removeAuthorizedClient(java.lang.String clientRegistrationId, java.lang.String principalName)
Removes theOAuth2AuthorizedClient
associated to the provided client registration identifier and End-User'sPrincipal
name.reactor.core.publisher.Mono<java.lang.Void>
saveAuthorizedClient(OAuth2AuthorizedClient authorizedClient, Authentication principal)
Saves theOAuth2AuthorizedClient
associating it to the provided End-UserAuthentication
(Resource Owner).
-
-
-
Constructor Detail
-
InMemoryReactiveOAuth2AuthorizedClientService
public InMemoryReactiveOAuth2AuthorizedClientService(ReactiveClientRegistrationRepository clientRegistrationRepository)
Constructs anInMemoryReactiveOAuth2AuthorizedClientService
using the provided parameters.- Parameters:
clientRegistrationRepository
- the repository of client registrations
-
-
Method Detail
-
loadAuthorizedClient
public <T extends OAuth2AuthorizedClient> reactor.core.publisher.Mono<T> loadAuthorizedClient(java.lang.String clientRegistrationId, java.lang.String principalName)
Description copied from interface:ReactiveOAuth2AuthorizedClientService
Returns theOAuth2AuthorizedClient
associated to the provided client registration identifier and End-User'sPrincipal
name ornull
if not available.- Specified by:
loadAuthorizedClient
in 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
OAuth2AuthorizedClient
ornull
if not available
-
saveAuthorizedClient
public reactor.core.publisher.Mono<java.lang.Void> saveAuthorizedClient(OAuth2AuthorizedClient authorizedClient, Authentication principal)
Description copied from interface:ReactiveOAuth2AuthorizedClientService
Saves theOAuth2AuthorizedClient
associating it to the provided End-UserAuthentication
(Resource Owner).- Specified by:
saveAuthorizedClient
in interfaceReactiveOAuth2AuthorizedClientService
- Parameters:
authorizedClient
- the authorized clientprincipal
- the End-UserAuthentication
(Resource Owner)
-
removeAuthorizedClient
public reactor.core.publisher.Mono<java.lang.Void> removeAuthorizedClient(java.lang.String clientRegistrationId, java.lang.String principalName)
Description copied from interface:ReactiveOAuth2AuthorizedClientService
Removes theOAuth2AuthorizedClient
associated to the provided client registration identifier and End-User'sPrincipal
name.- Specified by:
removeAuthorizedClient
in interfaceReactiveOAuth2AuthorizedClientService
- Parameters:
clientRegistrationId
- the identifier for the client's registrationprincipalName
- the name of the End-UserPrincipal
(Resource Owner)
-
-