クラス CompositeSessionAuthenticationStrategy
java.lang.ObjectSE
org.springframework.security.web.authentication.session.CompositeSessionAuthenticationStrategy
- 実装されたすべてのインターフェース:
SessionAuthenticationStrategy
public class CompositeSessionAuthenticationStrategy
extends ObjectSE
implements SessionAuthenticationStrategy
複数の
SessionAuthenticationStrategy
実装を受け入れて委譲する SessionAuthenticationStrategy
。各 SessionAuthenticationStrategy
は順番に呼び出されます。例外(つまり、SessionAuthenticationException)がスローされた場合、呼び出しは短絡されます。一般的な使用箇所には、次のデリゲートが含まれます (この順序)
ConcurrentSessionControlAuthenticationStrategy
- ユーザーが認証を許可されていることを確認します(つまり、ユーザーはまだアプリケーションにログインしていない)。SessionFixationProtectionStrategy
- セッション固定が必要な場合、ConcurrentSessionControlAuthenticationStrategy
が認証を拒否した場合に不要なHttpSession
の作成を防ぐために、SessionFixationProtectionStrategy
はConcurrentSessionControlAuthenticationStrategy
の後にある必要があります。RegisterSessionAuthenticationStrategy
- 正しいセッションが登録されるように、これはSessionFixationProtectionStrategy
の後にあることが重要です。
- 導入:
- 3.2
コンストラクターの概要
コンストラクターコンストラクター説明CompositeSessionAuthenticationStrategy
(ListSE<SessionAuthenticationStrategy> delegateStrategies) メソッドのサマリー
修飾子と型メソッド説明void
onAuthentication
(Authentication authentication, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) 新しい認証が発生したときに Http セッション関連の機能を実行します。toString()
コンストラクターの詳細
CompositeSessionAuthenticationStrategy
public CompositeSessionAuthenticationStrategy(ListSE<SessionAuthenticationStrategy> delegateStrategies)
メソッドの詳細
onAuthentication
public void onAuthentication(Authentication authentication, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws SessionAuthenticationException インターフェースからコピーされた説明:SessionAuthenticationStrategy
新しい認証が発生したときに Http セッション関連の機能を実行します。- 次で指定:
- インターフェース
SessionAuthenticationStrategy
のonAuthentication
- 例外:
SessionAuthenticationException
- セッションで認証が許可されていないと判断された場合。これは通常、ユーザーが一度に開いているセッションが多すぎるためです。
toString