クラス SimpleAttributes2GrantedAuthoritiesMapper

java.lang.ObjectSE
org.springframework.security.core.authority.mapping.SimpleAttributes2GrantedAuthoritiesMapper
実装されたすべてのインターフェース:
org.springframework.beans.factory.InitializingBeanAttributes2GrantedAuthoritiesMapper

public class SimpleAttributes2GrantedAuthoritiesMapper extends ObjectSE implements Attributes2GrantedAuthoritiesMapper, org.springframework.beans.factory.InitializingBean

このクラスは、ロールから Spring Security GrantedAuthorities への 1 対 1 のマッピングを行うことにより、Attributes2GrantedAuthoritiesMapper インターフェースを実装します。オプションで接頭辞を追加でき、属性名を大文字または小文字に変換できます。

デフォルトでは、属性が "ROLE_" で始まっていない限り、属性の前に "ROLE_" が付き、大文字小文字の変換は行われません。

導入:
2.0
  • コンストラクターの詳細

    • SimpleAttributes2GrantedAuthoritiesMapper

      public SimpleAttributes2GrantedAuthoritiesMapper()
  • メソッドの詳細

    • afterPropertiesSet

      public void afterPropertiesSet()
      すべてのプロパティが正しい値に設定されているかどうかを確認します。
      次で指定:
      インターフェース org.springframework.beans.factory.InitializingBeanafterPropertiesSet 
    • getGrantedAuthorities

      public ListSE<GrantedAuthority> getGrantedAuthorities(CollectionSE<StringSE> attributes)
      文字列属性の指定されたリストを 1 対 1 で Spring Security GrantedAuthorities にマップします。
      次で指定:
      インターフェース Attributes2GrantedAuthoritiesMappergetGrantedAuthorities 
      パラメーター:
      attributes - マップされる属性
      戻り値:
      属性から作成された権限のコレクション
    • setConvertAttributeToLowerCase

      public void setConvertAttributeToLowerCase(boolean b)
    • setConvertAttributeToUpperCase

      public void setConvertAttributeToUpperCase(boolean b)
    • setAttributePrefix

      public void setAttributePrefix(StringSE string)
    • setAddPrefixIfAlreadyExisting

      public void setAddPrefixIfAlreadyExisting(boolean b)