クラス 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) メソッドのサマリー
修飾子と型メソッド説明voidonAuthentication(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