クラス JdbcOAuth2AuthorizedClientService
java.lang.ObjectSE
org.springframework.security.oauth2.client.JdbcOAuth2AuthorizedClientService
- 実装されたすべてのインターフェース:
OAuth2AuthorizedClientService
public class JdbcOAuth2AuthorizedClientService
extends ObjectSE
implements OAuth2AuthorizedClientService
OAuth2AuthorizedClient
永続性のために JdbcOperations
を使用する OAuth2AuthorizedClientService
の JDBC 実装。 注意 : この OAuth2AuthorizedClientService
は、"classpath:org/springframework/security/oauth2/client/oauth2-client-schema.sql" で説明されているテーブル定義に依存しているため、データベーススキーマで定義する必要があります。
- 導入:
- 5.3
- 関連事項:
OAuth2AuthorizedClientService
OAuth2AuthorizedClient
JdbcOperations
RowMapper
ネストされたクラスのサマリー
ネストされたクラス修飾子と型クラス説明static final class
OAuth2AuthorizedClient
およびエンドユーザーAuthentication
(リソース所有者)のホルダー。static class
JdbcOAuth2AuthorizedClientService.OAuth2AuthorizedClientHolder
をSqlParameterValue
のList
にマップするデフォルトのFunction
。static class
フィールドサマリー
フィールド修飾子と型フィールド説明protected FunctionSE<JdbcOAuth2AuthorizedClientService.OAuth2AuthorizedClientHolder,
ListSE<org.springframework.jdbc.core.SqlParameterValue>> protected org.springframework.jdbc.core.RowMapper<OAuth2AuthorizedClient>
protected final org.springframework.jdbc.core.JdbcOperations
protected final org.springframework.jdbc.support.lob.LobHandler
コンストラクターのサマリー
コンストラクターコンストラクター説明JdbcOAuth2AuthorizedClientService
(org.springframework.jdbc.core.JdbcOperations jdbcOperations, ClientRegistrationRepository clientRegistrationRepository) 指定されたパラメーターを使用してJdbcOAuth2AuthorizedClientService
を構築します。JdbcOAuth2AuthorizedClientService
(org.springframework.jdbc.core.JdbcOperations jdbcOperations, ClientRegistrationRepository clientRegistrationRepository, org.springframework.jdbc.support.lob.LobHandler lobHandler) 指定されたパラメーターを使用してJdbcOAuth2AuthorizedClientService
を構築します。メソッドのサマリー
修飾子と型メソッド説明<T extends OAuth2AuthorizedClient>
TloadAuthorizedClient
(StringSE clientRegistrationId, StringSE principalName) void
removeAuthorizedClient
(StringSE clientRegistrationId, StringSE principalName) 指定されたクライアント登録識別子とエンドユーザーのPrincipal
名に関連付けられたOAuth2AuthorizedClient
を削除します。void
saveAuthorizedClient
(OAuth2AuthorizedClient authorizedClient, Authentication principal) 指定されたエンドユーザーAuthentication
(リソース所有者)に関連付けてOAuth2AuthorizedClient
を保存します。final void
setAuthorizedClientParametersMapper
(FunctionSE<JdbcOAuth2AuthorizedClientService.OAuth2AuthorizedClientHolder, ListSE<org.springframework.jdbc.core.SqlParameterValue>> authorizedClientParametersMapper) JdbcOAuth2AuthorizedClientService.OAuth2AuthorizedClientHolder
をSqlParameterValue
のList
にマッピングするために使用されるFunction
を設定します。final void
setAuthorizedClientRowMapper
(org.springframework.jdbc.core.RowMapper<OAuth2AuthorizedClient> authorizedClientRowMapper)
フィールドの詳細
jdbcOperations
protected final org.springframework.jdbc.core.JdbcOperations jdbcOperationsauthorizedClientRowMapper
authorizedClientParametersMapper
protected FunctionSE<JdbcOAuth2AuthorizedClientService.OAuth2AuthorizedClientHolder,ListSE<org.springframework.jdbc.core.SqlParameterValue>> authorizedClientParametersMapperlobHandler
protected final org.springframework.jdbc.support.lob.LobHandler lobHandler
コンストラクターの詳細
JdbcOAuth2AuthorizedClientService
public JdbcOAuth2AuthorizedClientService(org.springframework.jdbc.core.JdbcOperations jdbcOperations, ClientRegistrationRepository clientRegistrationRepository) 指定されたパラメーターを使用してJdbcOAuth2AuthorizedClientService
を構築します。- パラメーター:
jdbcOperations
- JDBC オペレーションclientRegistrationRepository
- クライアント登録のリポジトリ
JdbcOAuth2AuthorizedClientService
public JdbcOAuth2AuthorizedClientService(org.springframework.jdbc.core.JdbcOperations jdbcOperations, ClientRegistrationRepository clientRegistrationRepository, org.springframework.jdbc.support.lob.LobHandler lobHandler) 指定されたパラメーターを使用してJdbcOAuth2AuthorizedClientService
を構築します。- パラメーター:
jdbcOperations
- JDBC オペレーションclientRegistrationRepository
- クライアント登録のリポジトリlobHandler
- 大きなバイナリフィールドと大きなテキストフィールドのハンドラー- 導入:
- 5.5
メソッドの詳細
loadAuthorizedClient
public <T extends OAuth2AuthorizedClient> T loadAuthorizedClient(StringSE clientRegistrationId, StringSE principalName) インターフェースからコピーされた説明:OAuth2AuthorizedClientService
- 次で指定:
- インターフェース
OAuth2AuthorizedClientService
のloadAuthorizedClient
- 型パラメーター:
T
- OAuth2AuthorizedClient の型- パラメーター:
clientRegistrationId
- クライアントの登録の識別子principalName
- エンドユーザーPrincipal
の名前 (リソース所有者)- 戻り値:
OAuth2AuthorizedClient
またはnull
が利用できない場合
saveAuthorizedClient
インターフェースからコピーされた説明:OAuth2AuthorizedClientService
指定されたエンドユーザーAuthentication
(リソース所有者)に関連付けてOAuth2AuthorizedClient
を保存します。- 次で指定:
- インターフェース
OAuth2AuthorizedClientService
のsaveAuthorizedClient
- パラメーター:
authorizedClient
- 認可されたクライアントprincipal
- エンドユーザーAuthentication
(リソース所有者)
removeAuthorizedClient
インターフェースからコピーされた説明:OAuth2AuthorizedClientService
指定されたクライアント登録識別子とエンドユーザーのPrincipal
名に関連付けられたOAuth2AuthorizedClient
を削除します。- 次で指定:
- インターフェース
OAuth2AuthorizedClientService
のremoveAuthorizedClient
- パラメーター:
clientRegistrationId
- クライアントの登録の識別子principalName
- エンドユーザーPrincipal
の名前 (リソース所有者)
setAuthorizedClientRowMapper
public final void setAuthorizedClientRowMapper(org.springframework.jdbc.core.RowMapper<OAuth2AuthorizedClient> authorizedClientRowMapper) java.sql.ResultSet
の現在の行をOAuth2AuthorizedClient
にマッピングするために使用されるRowMapper
を設定します。デフォルトはJdbcOAuth2AuthorizedClientService.OAuth2AuthorizedClientRowMapper
です。- パラメーター:
authorizedClientRowMapper
-java.sql.ResultSet
の現在の行をOAuth2AuthorizedClient
にマッピングするために使用されるRowMapper
setAuthorizedClientParametersMapper
public final void setAuthorizedClientParametersMapper(FunctionSE<JdbcOAuth2AuthorizedClientService.OAuth2AuthorizedClientHolder, ListSE<org.springframework.jdbc.core.SqlParameterValue>> authorizedClientParametersMapper) JdbcOAuth2AuthorizedClientService.OAuth2AuthorizedClientHolder
をSqlParameterValue
のList
にマッピングするために使用されるFunction
を設定します。デフォルトはJdbcOAuth2AuthorizedClientService.OAuth2AuthorizedClientParametersMapper
です。- パラメーター:
authorizedClientParametersMapper
-JdbcOAuth2AuthorizedClientService.OAuth2AuthorizedClientHolder
をSqlParameterValue
のList
にマッピングするために使用されるFunction