public final class HttpSessionOAuth2AuthorizedClientRepository extends java.lang.Object implements OAuth2AuthorizedClientRepository
OAuth2AuthorizedClientRepository
that stores
OAuth2AuthorizedClient
's in the HttpSession
.OAuth2AuthorizedClientRepository
,
OAuth2AuthorizedClient
Constructor and Description |
---|
HttpSessionOAuth2AuthorizedClientRepository() |
Modifier and Type | Method and Description |
---|---|
<T extends OAuth2AuthorizedClient> |
loadAuthorizedClient(java.lang.String clientRegistrationId,
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,
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,
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). |
public HttpSessionOAuth2AuthorizedClientRepository()
public <T extends OAuth2AuthorizedClient> T loadAuthorizedClient(java.lang.String clientRegistrationId, Authentication principal, javax.servlet.http.HttpServletRequest request)
OAuth2AuthorizedClientRepository
OAuth2AuthorizedClient
associated to the
provided client registration identifier and End-User Authentication
(Resource Owner)
or null
if not available.loadAuthorizedClient
in interface OAuth2AuthorizedClientRepository
T
- a type of OAuth2AuthorizedClientclientRegistrationId
- the identifier for the client's registrationprincipal
- the End-User Authentication
(Resource Owner)request
- the HttpServletRequest
OAuth2AuthorizedClient
or null
if not availablepublic void saveAuthorizedClient(OAuth2AuthorizedClient authorizedClient, Authentication principal, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
OAuth2AuthorizedClientRepository
OAuth2AuthorizedClient
associating it to
the provided End-User Authentication
(Resource Owner).saveAuthorizedClient
in interface OAuth2AuthorizedClientRepository
authorizedClient
- the authorized clientprincipal
- the End-User Authentication
(Resource Owner)request
- the HttpServletRequest
response
- the HttpServletResponse
public void removeAuthorizedClient(java.lang.String clientRegistrationId, Authentication principal, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
OAuth2AuthorizedClientRepository
OAuth2AuthorizedClient
associated to the
provided client registration identifier and End-User Authentication
(Resource Owner).removeAuthorizedClient
in interface OAuth2AuthorizedClientRepository
clientRegistrationId
- the identifier for the client's registrationprincipal
- the End-User Authentication
(Resource Owner)request
- the HttpServletRequest
response
- the HttpServletResponse