クラス JwtBearerTokenAuthenticationConverter
java.lang.ObjectSE
org.springframework.security.oauth2.server.resource.authentication.JwtBearerTokenAuthenticationConverter
- 実装済みのインターフェース一覧:
org.springframework.core.convert.converter.Converter<Jwt, AbstractAuthenticationToken>
public final class JwtBearerTokenAuthenticationConverter
extends ObjectSE
implements org.springframework.core.convert.converter.Converter<Jwt, AbstractAuthenticationToken>
Jwt を受け取り、それを BearerTokenAuthentication に変換する Converter。このプロセスでは、「スコープ」または "scp" 属性のいずれかが最初に見つかった方の解析を試みます。これは単なるアダプターであるため、この実装を構成することは意図されていません。たとえば、カスタム JwtGrantedAuthoritiesConverter を使用している場合は、カスタム JwtGrantedAuthoritiesConverter に委譲して適切な BearerTokenAuthentication をインスタンス化する独自の Converter を作成することをお勧めします。- 導入:
- 5.2
コンストラクター概要
コンストラクター方法の概要
修飾子と型メソッド説明voidsetJwtPrincipalConverter(org.springframework.core.convert.converter.Converter<Jwt, OAuth2AuthenticatedPrincipal> jwtPrincipalConverter) 使用するConverter<Jwt, OAuth2AuthenticatedPrincipal>を設定します。クラス ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSEインターフェース org.springframework.core.convert.converter.Converter から継承されたメソッド
andThen
コンストラクターの詳細
JwtBearerTokenAuthenticationConverter
public JwtBearerTokenAuthenticationConverter()
方法の詳細
convert
- 次で指定:
- インターフェース
org.springframework.core.convert.converter.Converter<Jwt, AbstractAuthenticationToken>内のconvert
setJwtPrincipalConverter
public void setJwtPrincipalConverter(org.springframework.core.convert.converter.Converter<Jwt, OAuth2AuthenticatedPrincipal> jwtPrincipalConverter) 使用するConverter<Jwt, OAuth2AuthenticatedPrincipal>を設定します。デフォルトでは、
Jwtから派生したクレームと権限に基づいてDefaultOAuth2AuthenticatedPrincipalを構築します。- パラメーター:
jwtPrincipalConverter- コンバーター- 導入:
- 7.1