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