クラス 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)
メソッドのサマリー
すべてのメソッド インスタンスメソッド 具象メソッド 修飾子と型 メソッド 説明 void
onAuthentication(Authentication authentication, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
新しい認証が発生したときに Http セッション関連の機能を実行します。java.lang.String
toString()
コンストラクターの詳細
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