クラス SecurityContextChangedEvent

java.lang.ObjectSE
java.util.EventObjectSE
org.springframework.context.ApplicationEvent
org.springframework.security.core.context.SecurityContextChangedEvent
実装されたすべてのインターフェース:
SerializableSE

public class SecurityContextChangedEvent extends org.springframework.context.ApplicationEvent
SecurityContext の変更を表すイベント
導入:
5.6
関連事項:
  • フィールドの詳細

  • コンストラクターの詳細

    • SecurityContextChangedEvent

      public SecurityContextChangedEvent(SupplierSE<SecurityContext> oldContext, SupplierSE<SecurityContext> newContext)
      イベントを作成する
      パラメーター:
      oldContext - 古いセキュリティコンテキスト
      newContext - 新しいセキュリティコンテキスト。コンテキストがクリアされている場合は NO_CONTEXT を使用します
      導入:
      5.8
    • SecurityContextChangedEvent

      public SecurityContextChangedEvent(SecurityContext oldContext, SecurityContext newContext)
      イベントを作成する
      パラメーター:
      oldContext - 古いセキュリティコンテキスト
      newContext - 新しいセキュリティコンテキスト
  • メソッドの詳細

    • getOldContext

      public SecurityContext getOldContext()
      このイベントの直前に SecurityContextHolder に設定された SecurityContext を取得します
      戻り値:
      以前の SecurityContext
    • getNewContext

      public SecurityContext getNewContext()
      このイベントの時点で SecurityContextHolder に設定されている SecurityContext を取得します
      戻り値:
      現在の SecurityContext
    • isCleared

      public boolean isCleared()
      イベントがコンテキストクリアイベントかどうかを説明します。

      このメソッドは、新しいコンテキストを調べて、それがクリアされたイベントであることを確認するのを避けるのに便利です。

      戻り値:
      新しいコンテキストが NO_CONTEXT の場合は true 
      導入:
      5.8