public interface OAuth2AuthorizedClientRepository
Authorized Client(s) between requests.
The primary purpose of an Authorized Client is to
associate an Access Token credential to
a Client and Resource Owner, who
is the Principal that originally
granted the authorization.
OAuth2AuthorizedClient,
ClientRegistration,
Authentication,
OAuth2AccessToken| Modifier and Type | Method and Description |
|---|---|
<T extends OAuth2AuthorizedClient> |
loadAuthorizedClient(java.lang.String clientRegistrationId,
org.springframework.security.core.Authentication principal,
javax.servlet.http.HttpServletRequest request)
Returns the
OAuth2AuthorizedClient associated to the provided client
registration identifier and End-User Authentication (Resource Owner) or
null if not available. |
void |
removeAuthorizedClient(java.lang.String clientRegistrationId,
org.springframework.security.core.Authentication principal,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Removes the
OAuth2AuthorizedClient associated to the provided client
registration identifier and End-User Authentication (Resource Owner). |
void |
saveAuthorizedClient(OAuth2AuthorizedClient authorizedClient,
org.springframework.security.core.Authentication principal,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Saves the
OAuth2AuthorizedClient associating it to the provided End-User
Authentication (Resource Owner). |
<T extends OAuth2AuthorizedClient> T loadAuthorizedClient(java.lang.String clientRegistrationId, org.springframework.security.core.Authentication principal, javax.servlet.http.HttpServletRequest request)
OAuth2AuthorizedClient associated to the provided client
registration identifier and End-User Authentication (Resource Owner) or
null if not available.T - a type of OAuth2AuthorizedClientclientRegistrationId - the identifier for the client's registrationprincipal - the End-User Authentication (Resource Owner)request - the HttpServletRequestOAuth2AuthorizedClient or null if not availablevoid saveAuthorizedClient(OAuth2AuthorizedClient authorizedClient, org.springframework.security.core.Authentication principal, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
OAuth2AuthorizedClient associating it to the provided End-User
Authentication (Resource Owner).authorizedClient - the authorized clientprincipal - the End-User Authentication (Resource Owner)request - the HttpServletRequestresponse - the HttpServletResponsevoid removeAuthorizedClient(java.lang.String clientRegistrationId,
org.springframework.security.core.Authentication principal,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
OAuth2AuthorizedClient associated to the provided client
registration identifier and End-User Authentication (Resource Owner).clientRegistrationId - the identifier for the client's registrationprincipal - the End-User Authentication (Resource Owner)request - the HttpServletRequestresponse - the HttpServletResponse