クラス PreAuthenticatedAuthenticationToken
java.lang.ObjectSE
org.springframework.security.authentication.AbstractAuthenticationToken
org.springframework.security.web.authentication.preauth.PreAuthenticatedAuthenticationToken
- 実装されているすべてのインターフェース:
SerializableSE、PrincipalSE、Authentication、CredentialsContainer
事前認証認証用の
Authentication 実装。- 導入:
- 2.0
- 関連事項:
ネストされたクラスの要約
ネストされたクラス修飾子と型クラス説明static classPreAuthenticatedAuthenticationToken.Builder<B extends PreAuthenticatedAuthenticationToken.Builder<B>>PreAuthenticatedAuthenticationTokenインスタンスのビルダークラス org.springframework.security.authentication.AbstractAuthenticationToken から継承されたネストクラス / インターフェース
AbstractAuthenticationToken.AbstractAuthenticationBuilder<B extends AbstractAuthenticationToken.AbstractAuthenticationBuilder<B>>コンストラクターの概要
コンストラクター修飾子コンストラクター説明PreAuthenticatedAuthenticationToken(ObjectSE aPrincipal, @Nullable ObjectSE aCredentials) 認証リクエストに使用されるコンストラクター。PreAuthenticatedAuthenticationToken(ObjectSE aPrincipal, @Nullable ObjectSE aCredentials, CollectionSE<? extends GrantedAuthority> anAuthorities) 認証レスポンスに使用されるコンストラクター。protected方法の概要
クラス 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
コンストラクターの詳細
PreAuthenticatedAuthenticationToken
認証リクエストに使用されるコンストラクター。Authentication.isAuthenticated()はfalseを返します。- パラメーター:
aPrincipal- 事前認証されたプリンシパルaCredentials- 事前認証済みの資格情報
PreAuthenticatedAuthenticationToken
public PreAuthenticatedAuthenticationToken(ObjectSE aPrincipal, @Nullable ObjectSE aCredentials, CollectionSE<? extends GrantedAuthority> anAuthorities) 認証レスポンスに使用されるコンストラクター。Authentication.isAuthenticated()はtrueを返します。- パラメーター:
aPrincipal- 認証されたプリンシパルanAuthorities- 付与された権限
PreAuthenticatedAuthenticationToken
protected PreAuthenticatedAuthenticationToken(PreAuthenticatedAuthenticationToken.Builder<?> builder)
メソッドの詳細
getCredentials
資格情報を取得する- 戻り値:
Principalの身元を証明する資格情報
getPrincipal
プリンシパルを取得する- 戻り値:
- 認証される
Principalまたは認証後の認証されたプリンシパル。
toBuilder
インターフェースからコピーされた説明:Authenticationこのインスタンスに基づいてAuthentication.Builderを返します。デフォルトでは、SimpleAuthenticationを構築するビルダーを返します。default方式ではありますが、すべてのAuthentication実装でこれを実装する必要があります。これは、Authentication.Builder.build()が呼び出された際にAuthentication型が保持されることを保証するためです。これは、認証実装にカスタムフィールドが含まれている場合に特に重要です。アプリケーションは
Authenticationインターフェースにコード化することが推奨されており、カスタム情報は多くの場合Authentication.getPrincipal()値に含まれているため、これは厳密には必要ではありません。- 戻り値:
- このインスタンスに基づいて新しい
Authenticationを構築するためのAuthentication.Builder