クラス 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
- 関連事項:
コンストラクターのサマリー
コンストラクター修飾子コンストラクター説明protected
サブクラスコンストラクター。protected
AbstractOAuth2TokenAuthenticationToken
(T token, ObjectSE principal, ObjectSE credentials, CollectionSE<? extends GrantedAuthority> authorities) protected
AbstractOAuth2TokenAuthenticationToken
(T token, CollectionSE<? extends GrantedAuthority> authorities) サブクラスコンストラクター。メソッドのサマリー
修飾子と型メソッド説明プリンシパルが正しいことを証明する資格情報。認証されるプリンシパルの ID。final T
getToken()
この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
インターフェース 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)
メソッドの詳細
getPrincipal
インターフェースからコピーされた説明:Authentication
認証されるプリンシパルの ID。ユーザー名とパスワードを使用した認証リクエストの場合、これはユーザー名になります。呼び出し元は、認証リクエストのプリンシパルを設定することが期待されています。多くの場合、 AuthenticationManager 実装は、アプリケーションが使用するプリンシパルとして、より豊富な情報を含む Authentication を返します。認証プロバイダーの多くは、
UserDetails
オブジェクトをプリンシパルとして作成します。- 戻り値:
- 認証される
Principal
または認証後の認証されたプリンシパル。
getCredentials
インターフェースからコピーされた説明:Authentication
プリンシパルが正しいことを証明する資格情報。これは通常パスワードですが、AuthenticationManager
に関連するものであれば何でもかまいません。発信者は資格情報を入力する必要があります。- 戻り値:
Principal
の身元を証明する資格情報
getToken
このAuthentication
にバインドされたトークンを取得します。getTokenAttributes
アクセストークンの属性を返します。- 戻り値:
- アクセストークンの属性の
Map
。