クラス SwitchUserGrantedAuthority

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

public final class SwitchUserGrantedAuthority extends ObjectSE implements GrantedAuthority
SwitchUserFilter で使用されるカスタム GrantedAuthority 

元のユーザーの Authentication オブジェクトを格納し、後でユーザースイッチから「終了」するときに使用します。

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

  • メソッドの詳細

    • getSource

      public Authentication getSource()
      成功したユーザー切り替えに関連付けられた元のユーザーを返します。
      戻り値:
      切り替えられたユーザーの元の Authentication オブジェクト。
    • getAuthority

      public StringSE getAuthority()
      インターフェースからコピーされた説明: GrantedAuthority
      GrantedAuthority を String として表現でき、String が AccessDecisionManager(またはデリゲート)によるアクセス制御の決定に依存する精度で十分である場合、このメソッドはそのような String を返す必要があります。

      GrantedAuthority を String として十分な精度で表現できない場合、null を返す必要があります。null を返すには、GrantedAuthority 実装を具体的にサポートするために AccessDecisionManager (またはデリゲート)が必要になるため、実際に必要でない限り、null を返すことは避けてください。

      次で指定:
      インターフェース GrantedAuthoritygetAuthority 
      戻り値:
      付与された権限の表現(または付与された権限が十分な精度で String として表現できない場合は null)。
    • equals

      public boolean equals(ObjectSE obj)
      オーバーライド:
      クラス ObjectSEequalsSE 
    • hashCode

      public int hashCode()
      オーバーライド:
      クラス ObjectSEhashCode 
    • toString

      public StringSE toString()
      オーバーライド:
      クラス ObjectSEtoString