クラス BearerTokenAuthentication
java.lang.ObjectSE
org.springframework.security.authentication.AbstractAuthenticationToken
org.springframework.security.oauth2.server.resource.authentication.AbstractOAuth2TokenAuthenticationToken<OAuth2AccessToken>
org.springframework.security.oauth2.server.resource.authentication.BearerTokenAuthentication
- 実装済みのインターフェース一覧:
SerializableSE、PrincipalSE、Authentication、CredentialsContainer
@Transient
public class BearerTokenAuthentication
extends AbstractOAuth2TokenAuthenticationToken<OAuth2AccessToken>
ベアラートークンを介して取得された認証の成功を表す
Authentication トークン。- 導入:
- 5.2
- 関連事項:
ネストされたクラスの概要
ネストされたクラスクラス org.springframework.security.oauth2.server.resource.authentication.AbstractOAuth2TokenAuthenticationToken から継承されたネストクラス / インターフェース
AbstractOAuth2TokenAuthenticationToken.AbstractOAuth2TokenAuthenticationBuilder<T extends OAuth2Token,B extends AbstractOAuth2TokenAuthenticationToken.AbstractOAuth2TokenAuthenticationBuilder<T, B>> クラス org.springframework.security.authentication.AbstractAuthenticationToken から継承されたネストクラス / インターフェース
AbstractAuthenticationToken.AbstractAuthenticationBuilder<B extends AbstractAuthenticationToken.AbstractAuthenticationBuilder<B>>コンストラクター概要
コンストラクター修飾子コンストラクター説明BearerTokenAuthentication(OAuth2AuthenticatedPrincipal principal, OAuth2AccessToken credentials, CollectionSE<? extends GrantedAuthority> authorities) 指定された引数でBearerTokenAuthenticationを構築しますprotected方法の概要
クラス org.springframework.security.oauth2.server.resource.authentication.AbstractOAuth2TokenAuthenticationToken から継承されたメソッド
getCredentials, getPrincipal, getTokenクラス 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
コンストラクターの詳細
BearerTokenAuthentication
public BearerTokenAuthentication(OAuth2AuthenticatedPrincipal principal, OAuth2AccessToken credentials, CollectionSE<? extends GrantedAuthority> authorities) 指定された引数でBearerTokenAuthenticationを構築します- パラメーター:
principal- OAuth 2.0 属性credentials- 検証済みトークンauthorities- 指定されたトークンに関連付けられた権限
BearerTokenAuthentication
メソッドの詳細
getTokenAttributes
クラスからコピーされた説明:AbstractOAuth2TokenAuthenticationTokenアクセストークンの属性を返します。- 次で指定:
- クラス
AbstractOAuth2TokenAuthenticationToken<OAuth2AccessToken>のgetTokenAttributes - 戻り値:
- アクセストークンの属性の
Map。
toBuilder
インターフェースからコピーされた説明:Authenticationこのインスタンスに基づいてAuthentication.Builderを返します。デフォルトでは、SimpleAuthenticationを構築するビルダーを返します。default方式ではありますが、すべてのAuthentication実装でこれを実装する必要があります。これは、Authentication.Builder.build()が呼び出された際にAuthentication型が保持されることを保証するためです。これは、認証実装にカスタムフィールドが含まれている場合に特に重要です。アプリケーションは
Authenticationインターフェースにコード化することが推奨されており、カスタム情報は多くの場合Authentication.getPrincipal()値に含まれているため、これは厳密には必要ではありません。- 戻り値:
- このインスタンスに基づいて新しい
Authenticationを構築するためのAuthentication.Builder