クラス 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
コンストラクターのサマリー
コンストラクターメソッドのサマリー
修飾子と型メソッド説明指定されたJwt
からGrantedAuthority
を抽出します。void
setAuthoritiesClaimDelimiter
(StringSE authoritiesClaimDelimiter) 権限クレームの値をauthorities
に分割するために使用する正規表現を設定します。void
setAuthoritiesClaimName
(StringSE authoritiesClaimName) このコンバーターによるauthorities
のマッピングに使用するトークン要求の名前を設定します。void
setAuthorityPrefix
(StringSE authorityPrefix) このコンバーターによってマップされるauthorities
に使用するプレフィックスを設定します。クラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSE
インターフェース org.springframework.core.convert.converter.Converter から継承されたメソッド
andThen
コンストラクターの詳細
JwtGrantedAuthoritiesConverter
public JwtGrantedAuthoritiesConverter()
メソッドの詳細
convert
指定されたJwt
からGrantedAuthority
を抽出します。- 次で指定:
- インターフェース
org.springframework.core.convert.converter.Converter<Jwt,
のCollectionSE<GrantedAuthority>> convert
- パラメーター:
jwt
-Jwt
トークン- 戻り値:
- トークンスコープから読み取られた
authorities
setAuthorityPrefix
このコンバーターによってマップされるauthorities
に使用するプレフィックスを設定します。デフォルトはDEFAULT_AUTHORITY_PREFIX
です。- パラメーター:
authorityPrefix
- オーソリティプレフィックス- 導入:
- 5.2
setAuthoritiesClaimDelimiter
権限クレームの値をauthorities
に分割するために使用する正規表現を設定します。デフォルトはDEFAULT_AUTHORITIES_CLAIM_DELIMITER
です。- パラメーター:
authoritiesClaimDelimiter
- 権限を分割するために使用される正規表現- 導入:
- 6.1
setAuthoritiesClaimName
このコンバーターによるauthorities
のマッピングに使用するトークンクレームの名前を設定します。デフォルトはWELL_KNOWN_AUTHORITIES_CLAIM_NAMES
です。- パラメーター:
authoritiesClaimName
- 権限をマップするためのトークン要求名- 導入:
- 5.2