クラス SecurityContextCallableProcessingInterceptor
java.lang.ObjectSE
org.springframework.security.web.context.request.async.SecurityContextCallableProcessingInterceptor
- 実装されたすべてのインターフェース:
org.springframework.web.context.request.async.CallableProcessingInterceptor
public final class SecurityContextCallableProcessingInterceptor
extends ObjectSE
implements org.springframework.web.context.request.async.CallableProcessingInterceptor
Spring MVC の Callable
SE サポートとの統合を可能にします。
preProcess(NativeWebRequest, Callable)
が呼び出されたときに、SecurityContextHolder
に挿入された SecurityContext
を確立する CallableProcessingInterceptor
。また、postProcess(NativeWebRequest, Callable, Object)
メソッドで SecurityContextHolder.clearContext()
を呼び出して、SecurityContextHolder
をクリアします。
- 導入:
- 3.2
フィールドサマリー
インターフェース org.springframework.web.context.request.async.CallableProcessingInterceptor から継承されたフィールド
RESPONSE_HANDLED, RESULT_NONE
コンストラクターのサマリー
コンストラクター説明beforeConcurrentHandling(NativeWebRequest, Callable)
が呼び出されたときにSecurityContextHolder
からSecurityContext
を使用する新しいSecurityContextCallableProcessingInterceptor
を作成します。SecurityContextCallableProcessingInterceptor
(SecurityContext securityContext) 指定されたSecurityContext
で新しいSecurityContextCallableProcessingInterceptor
を作成します。メソッドのサマリー
修飾子と型メソッド説明<T> void
beforeConcurrentHandling
(org.springframework.web.context.request.NativeWebRequest request, CallableSE<T> task) <T> void
postProcess
(org.springframework.web.context.request.NativeWebRequest request, CallableSE<T> task, ObjectSE concurrentResult) <T> void
preProcess
(org.springframework.web.context.request.NativeWebRequest request, CallableSE<T> task) void
setSecurityContextHolderStrategy
(SecurityContextHolderStrategy securityContextHolderStrategy) 使用するSecurityContextHolderStrategy
を設定します。クラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSE
インターフェース org.springframework.web.context.request.async.CallableProcessingInterceptor から継承されたメソッド
afterCompletion, handleError, handleTimeout
コンストラクターの詳細
SecurityContextCallableProcessingInterceptor
public SecurityContextCallableProcessingInterceptor()beforeConcurrentHandling(NativeWebRequest, Callable)
が呼び出されたときにSecurityContextHolder
からSecurityContext
を使用する新しいSecurityContextCallableProcessingInterceptor
を作成します。SecurityContextCallableProcessingInterceptor
指定されたSecurityContext
で新しいSecurityContextCallableProcessingInterceptor
を作成します。- パラメーター:
securityContext
-preProcess(NativeWebRequest, Callable)
のSecurityContextHolder
に設定するSecurityContext
null にはできません。- 例外:
IllegalArgumentExceptionSE
-SecurityContext
が null の場合。
メソッドの詳細
beforeConcurrentHandling
public <T> void beforeConcurrentHandling(org.springframework.web.context.request.NativeWebRequest request, CallableSE<T> task) - 次で指定:
- インターフェース
org.springframework.web.context.request.async.CallableProcessingInterceptor
のbeforeConcurrentHandling
preProcess
public <T> void preProcess(org.springframework.web.context.request.NativeWebRequest request, CallableSE<T> task) - 次で指定:
- インターフェース
org.springframework.web.context.request.async.CallableProcessingInterceptor
のpreProcess
postProcess
public <T> void postProcess(org.springframework.web.context.request.NativeWebRequest request, CallableSE<T> task, ObjectSE concurrentResult) - 次で指定:
- インターフェース
org.springframework.web.context.request.async.CallableProcessingInterceptor
のpostProcess
setSecurityContextHolderStrategy
public void setSecurityContextHolderStrategy(SecurityContextHolderStrategy securityContextHolderStrategy) 使用するSecurityContextHolderStrategy
を設定します。デフォルトのアクションは、SecurityContextHolder
に格納されているSecurityContextHolderStrategy
を使用することです。- 導入:
- 5.8