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.MessageSourceAccessor | messages |
| コンストラクターと説明 |
|---|
RunAsImplAuthenticationProvider() |
| 修飾子と型 | メソッドと説明 |
|---|---|
void | afterPropertiesSet() |
Authentication | authenticate(Authentication authentication)AuthenticationManager.authenticate(Authentication) と同じ契約で認証を実行します。 |
java.lang.String | getKey() |
void | setKey(java.lang.String key) |
void | setMessageSource(org.springframework.context.MessageSource messageSource) |
boolean | supports(java.lang.Class<?> authentication) この AuthenticationProvider が指定された Authentication オブジェクトをサポートする場合、true を返します。 |
public void afterPropertiesSet()
org.springframework.beans.factory.InitializingBean 内の afterPropertiesSet public Authentication authenticate(Authentication authentication) throws AuthenticationException
AuthenticationProviderAuthenticationManager.authenticate(Authentication) と同じ契約で認証を実行します。AuthenticationProvider 内の authenticate authentication - 認証リクエストオブジェクト。AuthenticationProvider が、渡された Authentication オブジェクトの認証をサポートできない場合、null を返すことがあります。そのような場合、提示された Authentication クラスをサポートする次の AuthenticationProvider が試行されます。AuthenticationException - 認証が失敗した場合。public java.lang.String getKey()
public void setKey(java.lang.String key)
public void setMessageSource(org.springframework.context.MessageSource messageSource)
org.springframework.context.MessageSourceAware 内の setMessageSource public boolean supports(java.lang.Class<?> authentication)
AuthenticationProviderAuthenticationProvider が指定された Authentication オブジェクトをサポートする場合、true を返します。true を返すことは、AuthenticationProvider が Authentication クラスの提示されたインスタンスを認証できることを保証しません。それは、それがより詳細な評価をサポートできることを示しています。AuthenticationProvider は、AuthenticationProvider.authenticate(Authentication) メソッドから null を返して、別の AuthenticationProvider を試す必要があることを示すことができます。
認証を実行できる AuthenticationProvider の選択は、実行時に ProviderManager で行われます。
AuthenticationProvider 内の supports Authentication クラスをより厳密に評価できる場合は true