Interface ServerOAuth2AuthorizedClientRepository
-
- All Known Implementing Classes:
AuthenticatedPrincipalServerOAuth2AuthorizedClientRepository,UnAuthenticatedServerOAuth2AuthorizedClientRepository,WebSessionServerOAuth2AuthorizedClientRepository
public interface ServerOAuth2AuthorizedClientRepositoryImplementations of this interface are responsible for the persistence ofAuthorized Client(s)between requests.The primary purpose of an
Authorized Clientis to associate anAccess Tokencredential to aClientand Resource Owner, who is thePrincipalthat originally granted the authorization.- Since:
- 5.1
- See Also:
OAuth2AuthorizedClient,ClientRegistration,Authentication,OAuth2AccessToken
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T extends OAuth2AuthorizedClient>
reactor.core.publisher.Mono<T>loadAuthorizedClient(java.lang.String clientRegistrationId, org.springframework.security.core.Authentication principal, org.springframework.web.server.ServerWebExchange exchange)Returns theOAuth2AuthorizedClientassociated to the provided client registration identifier and End-UserAuthentication(Resource Owner) ornullif not available.reactor.core.publisher.Mono<java.lang.Void>removeAuthorizedClient(java.lang.String clientRegistrationId, org.springframework.security.core.Authentication principal, org.springframework.web.server.ServerWebExchange exchange)Removes theOAuth2AuthorizedClientassociated to the provided client registration identifier and End-UserAuthentication(Resource Owner).reactor.core.publisher.Mono<java.lang.Void>saveAuthorizedClient(OAuth2AuthorizedClient authorizedClient, org.springframework.security.core.Authentication principal, org.springframework.web.server.ServerWebExchange exchange)Saves theOAuth2AuthorizedClientassociating it to the provided End-UserAuthentication(Resource Owner).
-
-
-
Method Detail
-
loadAuthorizedClient
<T extends OAuth2AuthorizedClient> reactor.core.publisher.Mono<T> loadAuthorizedClient(java.lang.String clientRegistrationId, org.springframework.security.core.Authentication principal, org.springframework.web.server.ServerWebExchange exchange)
Returns theOAuth2AuthorizedClientassociated to the provided client registration identifier and End-UserAuthentication(Resource Owner) ornullif 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
OAuth2AuthorizedClientornullif not available
-
saveAuthorizedClient
reactor.core.publisher.Mono<java.lang.Void> saveAuthorizedClient(OAuth2AuthorizedClient authorizedClient, org.springframework.security.core.Authentication principal, org.springframework.web.server.ServerWebExchange exchange)
Saves theOAuth2AuthorizedClientassociating 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<java.lang.Void> removeAuthorizedClient(java.lang.String clientRegistrationId, org.springframework.security.core.Authentication principal, org.springframework.web.server.ServerWebExchange exchange)Removes theOAuth2AuthorizedClientassociated 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
-
-