インターフェース OAuth2AuthorizedClientRepository
- すべての既知の実装クラス:
AuthenticatedPrincipalOAuth2AuthorizedClientRepository
,HttpSessionOAuth2AuthorizedClientRepository
public interface OAuth2AuthorizedClientRepository
このインターフェースの実装は、リクエスト間の
Authorized Client(s)
の永続化に責任があります。Authorized Client
の主な目的は、Access Token
クレデンシャルを Client
およびリソース所有者に関連付けることです。これは、最初に認可を付与した Principal
です。
メソッドのサマリー
修飾子と型メソッド説明<T extends OAuth2AuthorizedClient>
TloadAuthorizedClient
(StringSE clientRegistrationId, Authentication principal, jakarta.servlet.http.HttpServletRequest request) 指定されたクライアント登録識別子に関連付けられているOAuth2AuthorizedClient
と、エンドユーザーAuthentication
(リソース所有者)または使用できない場合はnull
を返します。void
removeAuthorizedClient
(StringSE clientRegistrationId, Authentication principal, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) 指定されたクライアント登録識別子に関連付けられているOAuth2AuthorizedClient
とエンドユーザーAuthentication
(リソース所有者)を削除します。void
saveAuthorizedClient
(OAuth2AuthorizedClient authorizedClient, Authentication principal, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) 指定されたエンドユーザーAuthentication
(リソース所有者)に関連付けてOAuth2AuthorizedClient
を保存します。
メソッドの詳細
loadAuthorizedClient
<T extends OAuth2AuthorizedClient> T loadAuthorizedClient(StringSE clientRegistrationId, Authentication principal, jakarta.servlet.http.HttpServletRequest request) 指定されたクライアント登録識別子に関連付けられているOAuth2AuthorizedClient
と、エンドユーザーAuthentication
(リソース所有者)または使用できない場合はnull
を返します。- 型パラメーター:
T
- OAuth2AuthorizedClient の型- パラメーター:
clientRegistrationId
- クライアントの登録の識別子principal
- エンドユーザーAuthentication
(リソース所有者)request
-HttpServletRequest
- 戻り値:
OAuth2AuthorizedClient
またはnull
が利用できない場合
saveAuthorizedClient
void saveAuthorizedClient(OAuth2AuthorizedClient authorizedClient, Authentication principal, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) 指定されたエンドユーザーAuthentication
(リソース所有者)に関連付けてOAuth2AuthorizedClient
を保存します。- パラメーター:
authorizedClient
- 認可されたクライアントprincipal
- エンドユーザーAuthentication
(リソース所有者)request
-HttpServletRequest
response
-HttpServletResponse
removeAuthorizedClient
void removeAuthorizedClient(StringSE clientRegistrationId, Authentication principal, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) 指定されたクライアント登録識別子に関連付けられているOAuth2AuthorizedClient
とエンドユーザーAuthentication
(リソース所有者)を削除します。- パラメーター:
clientRegistrationId
- クライアントの登録の識別子principal
- エンドユーザーAuthentication
(リソース所有者)request
-HttpServletRequest
response
-HttpServletResponse