クラス AbstractOAuth2TokenAuthenticationToken<T extends OAuth2Token >
java.lang.ObjectSE
org.springframework.security.authentication.AbstractAuthenticationToken
org.springframework.security.oauth2.server.resource.authentication.AbstractOAuth2TokenAuthenticationToken<T>
- 実装済みのインターフェース一覧:
SerializableSE, PrincipalSE, Authentication, CredentialsContainer
- 既知の直属サブクラス
BearerTokenAuthentication, JwtAuthenticationToken
public abstract class AbstractOAuth2TokenAuthenticationToken<T extends OAuth2Token>
extends AbstractAuthenticationToken
異なる OAuth 2.0 アクセストークン形式間の共通属性を公開する
AbstractAuthenticationToken 実装の基本クラス。 例: Jwt は、getTokenAttributes() または「イントロスペクション」を介して claims を公開できます。OAuth 2.0 アクセストークンは、getTokenAttributes() を介してイントロスペクションレスポンスの属性を公開する可能性があります。
- 導入:
- 5.1
- 関連事項:
ネストされたクラスの概要
ネストされたクラス修飾子と型クラス説明static classクラス AbstractAuthenticationToken から継承されたネストクラス / インターフェース
AbstractAuthenticationToken.AbstractAuthenticationBuilder<B>インターフェース Authentication から継承されたネストクラス / インターフェース
Authentication.Builder<B>コンストラクター概要
コンストラクター修飾子コンストラクター説明protectedAbstractOAuth2TokenAuthenticationToken(AbstractOAuth2TokenAuthenticationToken.AbstractOAuth2TokenAuthenticationBuilder<T, ?> builder) protectedサブクラスコンストラクター。protectedAbstractOAuth2TokenAuthenticationToken(T token, ObjectSE principal, ObjectSE credentials, @Nullable CollectionSE<? extends GrantedAuthority> authorities) protectedAbstractOAuth2TokenAuthenticationToken(T token, @Nullable CollectionSE<? extends GrantedAuthority> authorities) サブクラスコンストラクター。方法の概要
修飾子と型メソッド説明プリンシパルが正しいことを証明する資格情報。認証されるプリンシパルの ID。final TgetToken()このAuthenticationにバインドされたトークンを取得します。アクセストークンの属性を返します。クラス AbstractAuthenticationToken から継承されたメソッド
equals, eraseCredentials, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setAuthenticated, setDetails, toStringインターフェース Authentication から継承されたメソッド
toBuilderインターフェース PrincipalSE から継承されたメソッド
impliesSE
コンストラクターの詳細
AbstractOAuth2TokenAuthenticationToken
サブクラスコンストラクター。AbstractOAuth2TokenAuthenticationToken
protected AbstractOAuth2TokenAuthenticationToken(T token, @Nullable CollectionSE<? extends GrantedAuthority> authorities) サブクラスコンストラクター。- パラメーター:
authorities- アクセストークンに割り当てられた権限、またはnull
AbstractOAuth2TokenAuthenticationToken
protected AbstractOAuth2TokenAuthenticationToken(T token, ObjectSE principal, ObjectSE credentials, @Nullable CollectionSE<? extends GrantedAuthority> authorities) AbstractOAuth2TokenAuthenticationToken
protected AbstractOAuth2TokenAuthenticationToken(AbstractOAuth2TokenAuthenticationToken.AbstractOAuth2TokenAuthenticationBuilder<T, ?> builder)
方法の詳細
getPrincipal
インターフェースからコピーされた説明:Authentication認証されるプリンシパルの ID。ユーザー名とパスワードを使用した認証リクエストの場合、これはユーザー名になります。呼び出し元は、認証リクエストのプリンシパルを設定することが期待されています。多くの場合、 AuthenticationManager 実装は、アプリケーションが使用するプリンシパルとして、より豊富な情報を含む Authentication を返します。認証プロバイダーの多くは、
UserDetailsオブジェクトをプリンシパルとして作成します。- 戻り値:
- 認証される
Principalまたは認証後の認証されたプリンシパル。
getCredentials
インターフェースからコピーされた説明:Authenticationプリンシパルが正しいことを証明する資格情報。これは通常パスワードですが、AuthenticationManagerに関連するものであれば何でもかまいません。呼び出し元は資格情報を入力する必要があります。- 戻り値:
Principalの身元を証明する資格情報
getToken
このAuthenticationにバインドされたトークンを取得します。getTokenAttributes