クラス OAuth2ReactiveAuthorizationManagers
java.lang.ObjectSE
org.springframework.security.oauth2.core.authorization.OAuth2ReactiveAuthorizationManagers
OAuth 2.0 固有の
AuthorizationManager
を作成するための便利なクラス。- 導入:
- 6.2
- 関連事項:
メソッドのサマリー
修飾子と型メソッド説明static <T> ReactiveAuthorizationManager<T>
hasAnyScope
(StringSE... scopes) Authentication
がSCOPE_scope1
、SCOPE_scope2
、... の中から少なくとも 1 つの権限を持つことを要求するReactiveAuthorizationManager
を作成します。static <T> ReactiveAuthorizationManager<T>
メソッドの詳細
hasScope
Authentication
がSCOPE_scope
権限を持つことを必要とするReactiveAuthorizationManager
を作成します。例:
hasScope("read")
を呼び出す場合、各認証には値がSCOPE_read
であるGrantedAuthority
が必要になります。これは
AuthorityReactiveAuthorizationManager#hasAuthority("SCOPE_read")
を呼び出すことと同じです。- 型パラメーター:
T
- 安全なオブジェクト- パラメーター:
scope
- 必要なスコープ値- 戻り値:
"SCOPE_scope"
権限を必要とするReactiveAuthorizationManager
hasAnyScope
Authentication
がSCOPE_scope1
、SCOPE_scope2
、...SCOPE_scopeN
のうち少なくとも 1 つの権限を持つことを要求するReactiveAuthorizationManager
を作成します。例:
hasAnyScope("read", "write")
を呼び出す場合、各認証には少なくともSCOPE_read
またはSCOPE_write
の値を持つGrantedAuthority
が必要になります。これは
AuthorityReactiveAuthorizationManager#hasAnyAuthority("SCOPE_read", "SCOPE_write")
を呼び出すことと同じです。- 型パラメーター:
T
- 安全なオブジェクト- パラメーター:
scopes
- 許可するスコープ値- 戻り値:
"SCOPE_scope1"
、SCOPE_scope2
、...SCOPE_scopeN
のうち少なくとも 1 つの権限を必要とするReactiveAuthorizationManager
。