クラス DelegatingAuthenticationEntryPoint
- java.lang.Object
-
- org.springframework.security.web.authentication.DelegatingAuthenticationEntryPoint
- 実装済みのインターフェース一覧:
org.springframework.beans.factory.InitializingBean,AuthenticationEntryPoint
public class DelegatingAuthenticationEntryPoint extends java.lang.Object implements AuthenticationEntryPoint, org.springframework.beans.factory.InitializingBean
RequestMatcher評価に基づいて具体的なAuthenticationEntryPointを選択するAuthenticationEntryPoint。構成は次のようになります。
<bean id="daep" class="org.springframework.security.web.authentication.DelegatingAuthenticationEntryPoint"> <constructor-arg> <map> <entry key="hasIpAddress('192.168.1.0/24') and hasHeader('User-Agent','Mozilla')" value-ref="firstAEP" /> <entry key="hasHeader('User-Agent','MSIE')" value-ref="secondAEP" /> </map> </constructor-arg> <property name="defaultEntryPoint" ref="defaultAEP"/> </bean>この例では、マップキーのELRequestMatcherインスタンスを作成するRequestMatcherEditorを使用しています。- 導入:
- 3.0.2
コンストラクター概要
コンストラクター コンストラクター 説明 DelegatingAuthenticationEntryPoint(java.util.LinkedHashMap<RequestMatcher,AuthenticationEntryPoint> entryPoints)
方法の概要
すべてのメソッド インスタンスメソッド 具象メソッド 修飾子と型 メソッド 説明 voidafterPropertiesSet()voidcommence(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, AuthenticationException authException)認証スキームを開始します。voidsetDefaultEntryPoint(AuthenticationEntryPoint defaultEntryPoint)RequestMatcher が true を返さない場合に使用される EntryPoint
コンストラクターの詳細
DelegatingAuthenticationEntryPoint
public DelegatingAuthenticationEntryPoint(java.util.LinkedHashMap<RequestMatcher,AuthenticationEntryPoint> entryPoints)
メソッドの詳細
commence
public void commence(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, AuthenticationException authException) throws java.io.IOException, javax.servlet.ServletExceptionインターフェースからコピーされた説明:AuthenticationEntryPoint認証スキームを開始します。ExceptionTranslationFilterは、このメソッドを呼び出す前に、AbstractAuthenticationProcessingFilter.SPRING_SECURITY_SAVED_REQUEST_KEYという名前のHttpSession属性にリクエストされたターゲット URL を入力します。実装では、必要に応じて
ServletResponseのヘッダーを変更して、認証プロセスを開始する必要があります。- 次で指定:
- インターフェース
AuthenticationEntryPoint内のcommence - パラメーター:
request-AuthenticationExceptionが発生したリクエストresponse- ユーザーエージェントが認証を開始できるようにするauthException- 呼び出しの原因となった例外- 例外:
java.io.IOExceptionjavax.servlet.ServletException
setDefaultEntryPoint
public void setDefaultEntryPoint(AuthenticationEntryPoint defaultEntryPoint)
RequestMatcher が true を返さない場合に使用される EntryPoint
afterPropertiesSet
public void afterPropertiesSet()
- 次で指定:
- インターフェース
org.springframework.beans.factory.InitializingBean内のafterPropertiesSet