クラス CasGatewayAuthenticationRedirectFilter
java.lang.ObjectSE
org.springframework.web.filter.GenericFilterBean
org.springframework.security.cas.web.CasGatewayAuthenticationRedirectFilter
- 実装されたすべてのインターフェース:
jakarta.servlet.Filter
、org.springframework.beans.factory.Aware
、org.springframework.beans.factory.BeanNameAware
、org.springframework.beans.factory.DisposableBean
、org.springframework.beans.factory.InitializingBean
、org.springframework.context.EnvironmentAware
、org.springframework.core.env.EnvironmentCapable
、org.springframework.web.context.ServletContextAware
public final class CasGatewayAuthenticationRedirectFilter
extends org.springframework.web.filter.GenericFilterBean
リクエストを CAS サーバーにリダイレクトし、URL に
gateway=true
を追加します。リダイレクト時に、ServiceProperties.isSendRenew()
は無視され、sendRenew
パラメーターが gateway
パラメーターと互換性がないという仕様に合わせて false
と見なされます。詳細については、CAS プロトコル仕様を参照してください。リクエストがゲートウェイリクエストであるかどうかを他のフィルターが認識できるように、このフィルターはセッションを作成し、必要に応じて他のフィルターでチェックできる CAS_GATEWAY_AUTHENTICATION_ATTR
という名前の属性を追加します。このフィルターが定義されている場合は、CasAuthenticationFilter
の後に配置することをお勧めします。- 導入:
- 6.3
フィールドサマリー
フィールドクラス org.springframework.web.filter.GenericFilterBean から継承されたフィールド
logger
コンストラクターのサマリー
コンストラクターコンストラクター説明CasGatewayAuthenticationRedirectFilter
(StringSE casLoginUrl, ServiceProperties serviceProperties) このクラスの新しいインスタンスを構築しますメソッドのサマリー
修飾子と型メソッド説明void
doFilter
(jakarta.servlet.ServletRequest req, jakarta.servlet.ServletResponse res, jakarta.servlet.FilterChain chain) void
setRequestCache
(RequestCache requestCache) CAS サーバーからのリダイレクト後に再生される現在のリクエストを保存するために使用されるRequestCache
を設定します。void
setRequestMatcher
(RequestMatcher requestMatcher) このフィルターをトリガーするために使用されるRequestMatcher
を設定します。クラス org.springframework.web.filter.GenericFilterBean から継承されたメソッド
addRequiredProperty, afterPropertiesSet, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext
フィールドの詳細
CAS_GATEWAY_AUTHENTICATION_ATTR
- 関連事項:
コンストラクターの詳細
CasGatewayAuthenticationRedirectFilter
public CasGatewayAuthenticationRedirectFilter(StringSE casLoginUrl, ServiceProperties serviceProperties) このクラスの新しいインスタンスを構築します- パラメーター:
serviceProperties
-ServiceProperties
メソッドの詳細
doFilter
public void doFilter(jakarta.servlet.ServletRequest req, jakarta.servlet.ServletResponse res, jakarta.servlet.FilterChain chain) throws IOExceptionSE, jakarta.servlet.ServletException - 例外:
IOExceptionSE
jakarta.servlet.ServletException
setRequestMatcher
このフィルターをトリガーするために使用されるRequestMatcher
を設定します。デフォルトはCasGatewayResolverRequestMatcher
です。- パラメーター:
requestMatcher
- 使用するRequestMatcher
setRequestCache
CAS サーバーからのリダイレクト後に再生される現在のリクエストを保存するために使用されるRequestCache
を設定します。デフォルトはHttpSessionRequestCache
です。- パラメーター:
requestCache
- 使用するRequestCache