クラス JwtGrantedAuthoritiesConverter

java.lang.ObjectSE
org.springframework.security.oauth2.server.resource.authentication.JwtGrantedAuthoritiesConverter
実装されたすべてのインターフェース:
org.springframework.core.convert.converter.Converter<Jwt,CollectionSE<GrantedAuthority>>

public final class JwtGrantedAuthoritiesConverter extends ObjectSE implements org.springframework.core.convert.converter.Converter<Jwt,CollectionSE<GrantedAuthority>>
通常 Jwt にあるスコープ属性から GrantedAuthority を抽出します。
導入:
5.2
  • コンストラクターの詳細

    • JwtGrantedAuthoritiesConverter

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

    • convert

      public CollectionSE<GrantedAuthority> convert(Jwt jwt)
      指定された Jwt から GrantedAuthority を抽出します。
      次で指定:
      インターフェース org.springframework.core.convert.converter.Converter<Jwt,CollectionSE<GrantedAuthority>>convert 
      パラメーター:
      jwt - Jwt トークン
      戻り値:
      トークンスコープから読み取られた authorities
    • setAuthorityPrefix

      public void setAuthorityPrefix(StringSE authorityPrefix)
      このコンバーターによってマップされる authorities に使用するプレフィックスを設定します。デフォルトは DEFAULT_AUTHORITY_PREFIX です。
      パラメーター:
      authorityPrefix - オーソリティプレフィックス
      導入:
      5.2
    • setAuthoritiesClaimDelimiter

      public void setAuthoritiesClaimDelimiter(StringSE authoritiesClaimDelimiter)
      権限クレームの値を authorities に分割するために使用する正規表現を設定します。デフォルトは DEFAULT_AUTHORITIES_CLAIM_DELIMITER です。
      パラメーター:
      authoritiesClaimDelimiter - 権限を分割するために使用される正規表現
      導入:
      6.1
    • setAuthoritiesClaimName

      public void setAuthoritiesClaimName(StringSE authoritiesClaimName)
      このコンバーターによる authorities のマッピングに使用するトークンクレームの名前を設定します。デフォルトは WELL_KNOWN_AUTHORITIES_CLAIM_NAMES です。
      パラメーター:
      authoritiesClaimName - 権限をマップするためのトークン要求名
      導入:
      5.2