クラス OAuth2LoginReactiveAuthenticationManager
- java.lang.Object
-
- org.springframework.security.oauth2.client.authentication.OAuth2LoginReactiveAuthenticationManager
- 実装済みのインターフェース一覧:
ReactiveAuthenticationManager
public class OAuth2LoginReactiveAuthenticationManager extends java.lang.Object implements ReactiveAuthenticationManager
OAuth 2.0 認証コード付与フローを活用する OAuth 2.0 ログイン用のAuthenticationProviderの実装。このAuthenticationProviderは、認証サーバーのトークンエンドポイントを使用して認証コードのクレデンシャルを認証し、有効な場合はアクセストークンのクレデンシャルと交換するロールを果たします。また、
OAuth2UserServiceを使用して UserInfo エンドポイントからエンドユーザー(リソース所有者)のユーザー属性を取得し、OAuth2Userの形式でPrincipalを作成します。次に、OAuth2UserがOAuth2LoginAuthenticationTokenに関連付けられ、認証が完了します。
コンストラクター概要
コンストラクター コンストラクター 説明 OAuth2LoginReactiveAuthenticationManager(ReactiveOAuth2AccessTokenResponseClient<OAuth2AuthorizationCodeGrantRequest> accessTokenResponseClient, ReactiveOAuth2UserService<OAuth2UserRequest,OAuth2User> userService)
方法の概要
すべてのメソッド インスタンスメソッド 具象メソッド 修飾子と型 メソッド 説明 reactor.core.publisher.Mono<Authentication>authenticate(Authentication authentication)提供されたAuthenticationを認証しようとしますvoidsetAuthoritiesMapper(GrantedAuthoritiesMapper authoritiesMapper)OAuth2AuthenticatedPrincipal.getAuthorities()をOAuth2LoginAuthenticationTokenに関連付けられる新しい権限のセットにマッピングするために使用されるGrantedAuthoritiesMapperを設定します。
コンストラクターの詳細
OAuth2LoginReactiveAuthenticationManager
public OAuth2LoginReactiveAuthenticationManager(ReactiveOAuth2AccessTokenResponseClient<OAuth2AuthorizationCodeGrantRequest> accessTokenResponseClient, ReactiveOAuth2UserService<OAuth2UserRequest,OAuth2User> userService)
メソッドの詳細
authenticate
public reactor.core.publisher.Mono<Authentication> authenticate(Authentication authentication)
インターフェースからコピーされた説明:ReactiveAuthenticationManager提供されたAuthenticationを認証しようとします- 次で指定:
- インターフェース
ReactiveAuthenticationManager内のauthenticate - パラメーター:
authentication- テストするAuthentication- 戻り値:
- 認証が成功すると、
Authenticationが返されます。認証を判別できない場合、空の Mono が返されます。認証が失敗すると、Mono エラーが返されます。
setAuthoritiesMapper
public final void setAuthoritiesMapper(GrantedAuthoritiesMapper authoritiesMapper)
OAuth2AuthenticatedPrincipal.getAuthorities()をOAuth2LoginAuthenticationTokenに関連付けられる新しい権限のセットにマッピングするために使用されるGrantedAuthoritiesMapperを設定します。- パラメーター:
authoritiesMapper- ユーザーの権限のマッピングに使用されるGrantedAuthoritiesMapper- 導入:
- 5.4