クラス AuthorityUtils
java.lang.ObjectSE
org.springframework.security.core.authority.AuthorityUtils
GrantedAuthority コレクションなどを操作するためのユーティリティメソッド。
主に内部使用を目的としています。
フィールドサマリー
フィールドメソッドのサマリー
修飾子と型メソッド説明authorityListToSet
(CollectionSE<? extends GrantedAuthority> userAuthorities) GrantedAuthority オブジェクトの配列をセットに変換します。static ListSE<GrantedAuthority>
commaSeparatedStringToAuthorityList
(StringSE authorityString) カンマ区切りの文字列表現から GrantedAuthority オブジェクトの配列を作成します(例:static ListSE<GrantedAuthority>
createAuthorityList
(StringSE... authorities) オーソリティを GrantedAuthority オブジェクトのリストに変換します。static ListSE<GrantedAuthority>
createAuthorityList
(CollectionSE<StringSE> authorities) オーソリティを GrantedAuthority オブジェクトのリストに変換します。
フィールドの詳細
NO_AUTHORITIES
メソッドの詳細
commaSeparatedStringToAuthorityList
public static ListSE<GrantedAuthority> commaSeparatedStringToAuthorityList(StringSE authorityString) カンマ区切りの文字列表現(「ROLE_A、ROLE_B、ROLE_C」など)から GrantedAuthority オブジェクトの配列を作成します。- パラメーター:
authorityString
- カンマ区切りの文字列- 戻り値:
- 文字列をトークン化して作成された権限
authorityListToSet
public static SetSE<StringSE> authorityListToSet(CollectionSE<? extends GrantedAuthority> userAuthorities) GrantedAuthority オブジェクトの配列をセットに変換します。- 戻り値:
- GrantedAuthority.getAuthority() への各呼び出しから取得された文字列のセット
createAuthorityList
オーソリティを GrantedAuthority オブジェクトのリストに変換します。- パラメーター:
authorities
- 改宗する権限- 戻り値:
- GrantedAuthority オブジェクトのリスト
createAuthorityList
オーソリティを GrantedAuthority オブジェクトのリストに変換します。- パラメーター:
authorities
- 改宗する権限- 戻り値:
- GrantedAuthority オブジェクトのリスト
- 導入:
- 6.1