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
AnOAuth2AuthorizedClientServicethat storesAuthorized Client(s)in-memory.- Since:
- 5.1
- See Also:
OAuth2AuthorizedClientService,OAuth2AuthorizedClient,ClientRegistration,Authentication
-
-
Constructor Summary
Constructors Constructor Description InMemoryReactiveOAuth2AuthorizedClientService(ReactiveClientRegistrationRepository clientRegistrationRepository)Constructs anInMemoryReactiveOAuth2AuthorizedClientServiceusing 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 theOAuth2AuthorizedClientassociated to the provided client registration identifier and End-User'sPrincipalname ornullif not available.reactor.core.publisher.Mono<java.lang.Void>removeAuthorizedClient(java.lang.String clientRegistrationId, java.lang.String principalName)Removes theOAuth2AuthorizedClientassociated to the provided client registration identifier and End-User'sPrincipalname.reactor.core.publisher.Mono<java.lang.Void>saveAuthorizedClient(OAuth2AuthorizedClient authorizedClient, org.springframework.security.core.Authentication principal)Saves theOAuth2AuthorizedClientassociating it to the provided End-UserAuthentication(Resource Owner).
-
-
-
Constructor Detail
-
InMemoryReactiveOAuth2AuthorizedClientService
public InMemoryReactiveOAuth2AuthorizedClientService(ReactiveClientRegistrationRepository clientRegistrationRepository)
Constructs anInMemoryReactiveOAuth2AuthorizedClientServiceusing 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: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<java.lang.Void> saveAuthorizedClient(OAuth2AuthorizedClient authorizedClient, org.springframework.security.core.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<java.lang.Void> removeAuthorizedClient(java.lang.String clientRegistrationId, java.lang.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)
-
-