クラス DefaultJaasAuthenticationProvider
java.lang.ObjectSE
org.springframework.security.authentication.jaas.AbstractJaasAuthenticationProvider
org.springframework.security.authentication.jaas.DefaultJaasAuthenticationProvider
- 実装されているすべてのインターフェース:
EventListenerSE、org.springframework.beans.factory.Aware、org.springframework.beans.factory.InitializingBean、org.springframework.context.ApplicationEventPublisherAware、org.springframework.context.ApplicationListener<SessionDestroyedEvent>、AuthenticationProvider
提供された構成を使用して LoginContext を作成します。これにより、Configuration.getConfiguration() の値に関係なく、構成を注入できます。
特定の構成実装にバインドされていませんが、JAAS 構成のメモリ内バージョンは InMemoryConfiguration を使用して表すことができます。
次の JAAS 構成:
SPRINGSECURITY {
sample.SampleLoginModule required;
};
次のように表すことができます。
<bean id="jaasAuthProvider" class="org.springframework.security.authentication.jaas.DefaultJaasAuthenticationProvider">
<property name="configuration">
<bean class="org.springframework.security.authentication.jaas.memory.InMemoryConfiguration">
<constructor-arg>
<map>
<!-- SPRINGSECURITY is the default loginContextName for AbstractJaasAuthenticationProvider-->
<entry key="SPRINGSECURITY">
<array>
<bean class="javax.security.auth.login.AppConfigurationEntry">
<constructor-arg value="sample.SampleLoginModule" />
<constructor-arg>
<util:constant static-field="javax.security.auth.login.AppConfigurationEntry$LoginModuleControlFlag.REQUIRED" />
</constructor-arg>
<constructor-arg>
<map></map>
</constructor-arg>
</bean>
</array>
</entry>
</map>
</constructor-arg>
</bean>
</property>
<property name="authorityGranters">
<list>
<!-- You will need to write your own implementation of AuthorityGranter -->
<bean class="org.springframework.security.authentication.jaas.TestAuthorityGranter"/>
</list>
</property>
</bean>
フィールドのサマリー
クラス org.springframework.security.authentication.jaas.AbstractJaasAuthenticationProvider から継承されたフィールド
logコンストラクターの概要
コンストラクターメソッドのサマリー
修飾子と型メソッド説明void必要なプロパティが設定されていることを検証します。protected LoginContextSEcreateLoginContext(CallbackHandlerSE handler) setConfiguration(Configuration)で指定された構成を使用して LoginContext を作成します。protected ConfigurationSEvoidsetConfiguration(ConfigurationSE configuration) 認証に使用する構成を設定します。クラス org.springframework.security.authentication.jaas.AbstractJaasAuthenticationProvider から継承されたメソッド
authenticate, getApplicationEventPublisher, handleLogout, onApplicationEvent, publishFailureEvent, publishSuccessEvent, setApplicationEventPublisher, setAuthorityGranters, setCallbackHandlers, setLoginContextName, setLoginExceptionResolver, supportsクラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSEインターフェース org.springframework.context.ApplicationListener から継承されたメソッド
supportsAsyncExecution
コンストラクターの詳細
DefaultJaasAuthenticationProvider
public DefaultJaasAuthenticationProvider()
メソッドの詳細
afterPropertiesSet
クラスからコピーされた説明:AbstractJaasAuthenticationProvider必要なプロパティが設定されていることを検証します。さらに、AbstractJaasAuthenticationProvider.setCallbackHandlers(JaasAuthenticationCallbackHandler[])が有効なハンドラーで呼び出されていない場合は、JaasNameCallbackHandlerおよびJaasPasswordCallbackHandlerを使用するように初期化します。- 次で指定:
- インターフェース
org.springframework.beans.factory.InitializingBeanのafterPropertiesSet - オーバーライド:
- クラス
AbstractJaasAuthenticationProviderのafterPropertiesSet - 例外:
ExceptionSE
createLoginContext
setConfiguration(Configuration)で指定された構成を使用して LoginContext を作成します。- 次で指定:
- クラス
AbstractJaasAuthenticationProviderのcreateLoginContext - パラメーター:
handler- LoginContext に使用する必要がある CallbackHandler(非null)。- 戻り値:
- 認証に使用する LoginContext
- 例外:
LoginExceptionSE
getConfiguration
setConfiguration
認証に使用する構成を設定します。- パラメーター:
configuration-createLoginContext(CallbackHandler)が呼び出されたときに使用される構成。