クラス ConcurrentSessionFilter
- java.lang.Object
-
- org.springframework.web.filter.GenericFilterBean
-
- org.springframework.security.web.session.ConcurrentSessionFilter
- 実装されたすべてのインターフェース:
javax.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 class ConcurrentSessionFilter extends org.springframework.web.filter.GenericFilterBean
並行セッション処理パッケージに必要なフィルター。このフィルターは 2 つの機能を実行します。1 つ目は、リクエストごとに
SessionRegistry.refreshLastRequest(String)
を呼び出して、登録されたセッションが常に正しい「最終更新」の日付 / 時刻を持つようにすることです。次に、リクエストごとにSessionRegistry
からSessionInformation
を取得し、セッションが期限切れとしてマークされているかどうかを確認します。期限切れとしてマークされている場合、構成されたログアウトハンドラーが呼び出され(LogoutFilter
の場合と同様)、通常はセッションが無効になります。期限切れのセッションを処理するために、SessionInformationExpiredStrategy
への呼び出しが行われます。セッションの無効化により、web.xml
に登録されたHttpSessionEventPublisher
を介してHttpSessionDestroyedEvent
が発行されます。
コンストラクターのサマリー
コンストラクター コンストラクター 説明 ConcurrentSessionFilter(SessionRegistry sessionRegistry)
ConcurrentSessionFilter(SessionRegistry sessionRegistry, java.lang.String expiredUrl)
使用すべきではありません。ConcurrentSessionFilter(SessionRegistry sessionRegistry, SessionInformationExpiredStrategy sessionInformationExpiredStrategy)
メソッドのサマリー
すべてのメソッド インスタンスメソッド 具象メソッド 非推奨のメソッド 修飾子と型 メソッド 説明 void
afterPropertiesSet()
protected java.lang.String
determineExpiredUrl(javax.servlet.http.HttpServletRequest request, SessionInformation info)
使用すべきではありません。void
doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)
void
setLogoutHandlers(java.util.List<LogoutHandler> handlers)
LogoutHandler
のセットリストvoid
setLogoutHandlers(LogoutHandler[] handlers)
void
setRedirectStrategy(RedirectStrategy redirectStrategy)
使用すべきではありません。
コンストラクターの詳細
ConcurrentSessionFilter
public ConcurrentSessionFilter(SessionRegistry sessionRegistry)
ConcurrentSessionFilter
@Deprecated public ConcurrentSessionFilter(SessionRegistry sessionRegistry, java.lang.String expiredUrl)
使用すべきではありません。新しいインスタンスを作成します- パラメーター:
sessionRegistry
- 使用する SessionRegistryexpiredUrl
- リダイレクト先の URL
ConcurrentSessionFilter
public ConcurrentSessionFilter(SessionRegistry sessionRegistry, SessionInformationExpiredStrategy sessionInformationExpiredStrategy)
メソッドの詳細
afterPropertiesSet
public void afterPropertiesSet()
- 次で指定:
- インターフェース
org.springframework.beans.factory.InitializingBean
のafterPropertiesSet
- オーバーライド:
- クラス
org.springframework.web.filter.GenericFilterBean
のafterPropertiesSet
doFilter
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws java.io.IOException, javax.servlet.ServletException
- 例外:
java.io.IOException
javax.servlet.ServletException
determineExpiredUrl
@Deprecated protected java.lang.String determineExpiredUrl(javax.servlet.http.HttpServletRequest request, SessionInformation info)
使用すべきではありません。有効期限の URL を決定する- パラメーター:
request
- HttpServletRequestinfo
-SessionInformation
- 戻り値:
- 有効期限の URL
setLogoutHandlers
public void setLogoutHandlers(LogoutHandler[] handlers)
setLogoutHandlers
public void setLogoutHandlers(java.util.List<LogoutHandler> handlers)
LogoutHandler
のセットリスト- パラメーター:
handlers
-LogoutHandler
のリスト- 導入:
- 5.2.0
setRedirectStrategy
@Deprecated public void setRedirectStrategy(RedirectStrategy redirectStrategy)
使用すべきではありません。- パラメーター:
redirectStrategy
- 使用するRedirectStrategy