クラス RegisterSessionAuthenticationStrategy

java.lang.ObjectSE
org.springframework.security.web.authentication.session.RegisterSessionAuthenticationStrategy
実装されたすべてのインターフェース:
SessionAuthenticationStrategy

public class RegisterSessionAuthenticationStrategy extends ObjectSE implements SessionAuthenticationStrategy
Authentication の成功後、SessionRegistry にユーザーを登録するために使用される戦略。

RegisterSessionAuthenticationStrategy は通常、CompositeSessionAuthenticationStrategy および ConcurrentSessionControlAuthenticationStrategy と組み合わせて使用されますが、セッションの追跡が必要であるが、並行性を制御する必要がない場合は単独で使用できます。

NOTE: SessionRegistry を使用する場合、すべてのセッション(タイムアウトセッションを含む)を削除することが重要です。通常、これは HttpSessionEventPublisher を追加することによって行われます。

導入:
3.2
関連事項:
  • コンストラクターの詳細

    • RegisterSessionAuthenticationStrategy

      public RegisterSessionAuthenticationStrategy(SessionRegistry sessionRegistry)
      パラメーター:
      sessionRegistry - 認証されたセッションが変更されたときに更新されるセッションレジストリ。
  • メソッドの詳細

    • onAuthentication

      public void onAuthentication(Authentication authentication, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
      スーパークラスからの手順に加えて、sessionRegistry は新しいセッション情報で更新されます。
      次で指定:
      インターフェース SessionAuthenticationStrategyonAuthentication