クラス RunAsImplAuthenticationProvider
- java.lang.Object
-
- org.springframework.security.access.intercept.RunAsImplAuthenticationProvider
- 実装されているすべてのインターフェース:
org.springframework.beans.factory.Aware、org.springframework.beans.factory.InitializingBean、org.springframework.context.MessageSourceAware、AuthenticationProvider
public class RunAsImplAuthenticationProvider extends java.lang.Object implements org.springframework.beans.factory.InitializingBean, AuthenticationProvider, org.springframework.context.MessageSourceAware
RunAsUserTokenを認証できるAuthenticationProvider実装。RunAsUserTokenを生成するためにアダプターが使用するキーと一致する必要があるキーを使用して、Bean コンテキストで構成されます。RunAsImplAuthenticationProvider-configured キーに一致するハッシュコードを提示するすべてのRunAsUserTokenインスタンスを有効として扱います。キーが一致しない場合、
BadCredentialsExceptionがスローされます。
フィールドのサマリー
フィールド 修飾子と型 フィールド 説明 protected org.springframework.context.support.MessageSourceAccessormessages
コンストラクターの概要
コンストラクター コンストラクター 説明 RunAsImplAuthenticationProvider()
メソッドのサマリー
すべてのメソッド インスタンスメソッド 具象メソッド 修飾子と型 メソッド 説明 voidafterPropertiesSet()Authenticationauthenticate(Authentication authentication)AuthenticationManager.authenticate(Authentication)と同じ契約で認証を実行します。java.lang.StringgetKey()voidsetKey(java.lang.String key)voidsetMessageSource(org.springframework.context.MessageSource messageSource)booleansupports(java.lang.Class<?> authentication)このAuthenticationProviderが指定されたAuthenticationオブジェクトをサポートする場合、trueを返します。
メソッドの詳細
afterPropertiesSet
public void afterPropertiesSet()
- 次で指定:
- インターフェース
org.springframework.beans.factory.InitializingBeanのafterPropertiesSet
authenticate
public Authentication authenticate(Authentication authentication) throws AuthenticationException
インターフェースからコピーされた説明:AuthenticationProviderAuthenticationManager.authenticate(Authentication)と同じ契約で認証を実行します。- 次で指定:
- インターフェース
AuthenticationProviderのauthenticate - パラメーター:
authentication- 認証リクエストオブジェクト。- 戻り値:
- 資格情報を含む完全に認証されたオブジェクト。
AuthenticationProviderが、渡されたAuthenticationオブジェクトの認証をサポートできない場合、nullを返すことがあります。そのような場合、提示されたAuthenticationクラスをサポートする次のAuthenticationProviderが試行されます。 - 例外:
AuthenticationException- 認証が失敗した場合。
getKey
public java.lang.String getKey()
setKey
public void setKey(java.lang.String key)
setMessageSource
public void setMessageSource(org.springframework.context.MessageSource messageSource)
- 次で指定:
- インターフェース
org.springframework.context.MessageSourceAwareのsetMessageSource
supports
public boolean supports(java.lang.Class<?> authentication)
インターフェースからコピーされた説明:AuthenticationProviderこのAuthenticationProviderが指定されたAuthenticationオブジェクトをサポートする場合、trueを返します。trueを返すことは、AuthenticationProviderがAuthenticationクラスの提示されたインスタンスを認証できることを保証しません。それは、それがより詳細な評価をサポートできることを示しています。AuthenticationProviderは、AuthenticationProvider.authenticate(Authentication)メソッドからnullを返して、別のAuthenticationProviderを試す必要があることを示すことができます。認証を実行できる
AuthenticationProviderの選択は、実行時にProviderManagerで行われます。- 次で指定:
- インターフェース
AuthenticationProviderのsupports - 戻り値:
- 実装が提示された
Authenticationクラスをより厳密に評価できる場合はtrue