クラス 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クラス org.springframework.security.authentication.AbstractAuthenticationToken から継承されたネストクラス / インターフェース
AbstractAuthenticationToken.AbstractAuthenticationBuilder<B extends AbstractAuthenticationToken.AbstractAuthenticationBuilder<B>>インターフェース org.springframework.security.core.Authentication から継承されたネストクラス / インターフェース
Authentication.Builder<B extends Authentication.Builder<B>>コンストラクターの概要
コンストラクター修飾子コンストラクター説明protectedAbstractOAuth2TokenAuthenticationToken(AbstractOAuth2TokenAuthenticationToken.AbstractOAuth2TokenAuthenticationBuilder<T, ?> builder) protectedサブクラスコンストラクター。protectedAbstractOAuth2TokenAuthenticationToken(T token, ObjectSE principal, ObjectSE credentials, CollectionSE<? extends GrantedAuthority> authorities) protectedAbstractOAuth2TokenAuthenticationToken(T token, CollectionSE<? extends GrantedAuthority> authorities) サブクラスコンストラクター。メソッドのサマリー
修飾子と型メソッド説明プリンシパルが正しいことを証明する資格情報。認証されるプリンシパルの ID。final TgetToken()このAuthenticationにバインドされたトークンを取得します。アクセストークンの属性を返します。クラス org.springframework.security.authentication.AbstractAuthenticationToken から継承されたメソッド
equals, eraseCredentials, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setAuthenticated, setDetails, toStringクラス java.lang.ObjectSE から継承されたメソッド
clone, finalize, getClass, notify, notifyAll, wait, waitSE, waitSEインターフェース org.springframework.security.core.Authentication から継承されたメソッド
toBuilderインターフェース java.security.PrincipalSE から継承されたメソッド
impliesSE
コンストラクターの詳細
AbstractOAuth2TokenAuthenticationToken
サブクラスコンストラクター。AbstractOAuth2TokenAuthenticationToken
protected AbstractOAuth2TokenAuthenticationToken(T token, CollectionSE<? extends GrantedAuthority> authorities) サブクラスコンストラクター。- パラメーター:
authorities- アクセストークンに割り当てられた権限
AbstractOAuth2TokenAuthenticationToken
protected AbstractOAuth2TokenAuthenticationToken(T token, ObjectSE principal, ObjectSE credentials, 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
アクセストークンの属性を返します。- 戻り値:
- アクセストークンの属性の
Map。