インターフェース SwitchUserAuthorityChanger
public interface SwitchUserAuthorityChanger
サブクラスが、異なるプリンシパルの ID を引き継ぐときにプリンシパルに割り当てられる
GrantedAuthority リストを変更できるようにします。SwitchUserFilter に対して構成されています。
方法の概要
修飾子と型メソッド説明CollectionSE<? extends GrantedAuthority> modifyGrantedAuthorities(UserDetails targetUser, @Nullable Authentication currentAuthentication, CollectionSE<? extends GrantedAuthority> authoritiesToBeGranted) サブクラスが、ユーザー切り替えモードのときに付与される権限を追加または削除できるようにします。
方法の詳細
modifyGrantedAuthorities
CollectionSE<? extends GrantedAuthority> modifyGrantedAuthorities(UserDetails targetUser, @Nullable Authentication currentAuthentication, CollectionSE<? extends GrantedAuthority> authoritiesToBeGranted) サブクラスが、ユーザー切り替えモードのときに付与される権限を追加または削除できるようにします。- パラメーター:
targetUser- 切り替えられる ID を表す UserDetailscurrentAuthentication- 切り替えを実行するプリンシパルの現在の認証authoritiesToBeGranted- 内部で使用される特別な「ユーザー切り替え」権限を除く、ユーザーに付与されるすべてのGrantedAuthorityインスタンス (決して null を保証しない)- 戻り値:
- 付与された権限の変更されたリスト。