クラス SimpleAttributes2GrantedAuthoritiesMapper
java.lang.ObjectSE
org.springframework.security.core.authority.mapping.SimpleAttributes2GrantedAuthoritiesMapper
- 実装されたすべてのインターフェース:
org.springframework.beans.factory.InitializingBean
,Attributes2GrantedAuthoritiesMapper
public class SimpleAttributes2GrantedAuthoritiesMapper
extends ObjectSE
implements Attributes2GrantedAuthoritiesMapper, org.springframework.beans.factory.InitializingBean
このクラスは、ロールから Spring Security GrantedAuthorities への 1 対 1 のマッピングを行うことにより、Attributes2GrantedAuthoritiesMapper インターフェースを実装します。オプションで接頭辞を追加でき、属性名を大文字または小文字に変換できます。
デフォルトでは、属性が "ROLE_" で始まっていない限り、属性の前に "ROLE_" が付き、大文字小文字の変換は行われません。
- 導入:
- 2.0
コンストラクターのサマリー
コンストラクターメソッドのサマリー
修飾子と型メソッド説明void
すべてのプロパティが正しい値に設定されているかどうかを確認します。getGrantedAuthorities
(CollectionSE<StringSE> attributes) 文字列属性の指定されたリストを 1 対 1 で Spring Security GrantedAuthorities にマップします。void
setAddPrefixIfAlreadyExisting
(boolean b) void
setAttributePrefix
(StringSE string) void
setConvertAttributeToLowerCase
(boolean b) void
setConvertAttributeToUpperCase
(boolean b)
コンストラクターの詳細
SimpleAttributes2GrantedAuthoritiesMapper
public SimpleAttributes2GrantedAuthoritiesMapper()
メソッドの詳細
afterPropertiesSet
public void afterPropertiesSet()すべてのプロパティが正しい値に設定されているかどうかを確認します。- 次で指定:
- インターフェース
org.springframework.beans.factory.InitializingBean
のafterPropertiesSet
getGrantedAuthorities
文字列属性の指定されたリストを 1 対 1 で Spring Security GrantedAuthorities にマップします。- 次で指定:
- インターフェース
Attributes2GrantedAuthoritiesMapper
のgetGrantedAuthorities
- パラメーター:
attributes
- マップされる属性- 戻り値:
- 属性から作成された権限のコレクション
setConvertAttributeToLowerCase
public void setConvertAttributeToLowerCase(boolean b) setConvertAttributeToUpperCase
public void setConvertAttributeToUpperCase(boolean b) setAttributePrefix
setAddPrefixIfAlreadyExisting
public void setAddPrefixIfAlreadyExisting(boolean b)