クラス NimbusJwtDecoder
java.lang.ObjectSE
org.springframework.security.oauth2.jwt.NimbusJwtDecoder
- 実装されているすべてのインターフェース:
JwtDecoder
生の Nimbus 構成をとる
JwtDecoder の低レベル Nimbus 実装。- 導入:
- 5.2
ネストされたクラスの要約
ネストされたクラス修飾子と型クラス説明static final classJWK セット uri に基づいてNimbusJwtDecoderインスタンスを作成するためのビルダー。static final class公開鍵に基づいてNimbusJwtDecoderインスタンスを作成するためのビルダー。static final classSecretKeyに基づいてNimbusJwtDecoderインスタンスを作成するためのビルダー。コンストラクターの概要
コンストラクターコンストラクター説明NimbusJwtDecoder(com.nimbusds.jwt.proc.JWTProcessor<com.nimbusds.jose.proc.SecurityContext> jwtProcessor) 指定されたパラメーターでNimbusJwtDecoderを構成しますメソッドのサマリー
修飾子と型メソッド説明コンパクトなクレーム表現形式から JWT をデコードして検証するvoidsetClaimSetConverter(org.springframework.core.convert.converter.Converter<MapSE<StringSE, ObjectSE>, MapSE<StringSE, ObjectSE>> claimSetConverter) JWT のクレームセットを操作するには、次のConverterを使用しますvoidsetJwtValidator(OAuth2TokenValidator<Jwt> jwtValidator) このJwtValidator を使用してくださいwithIssuerLocation(StringSE issuer) withJwkSetUri(StringSE jwkSetUri) 指定された JWK セット uri を使用します。指定された公開鍵を使用して JWT を検証しますwithSecretKey(SecretKeySE secretKey) 指定されたSecretKeyを使用して、JSON Web 署名(JWS)の MAC を検証します。
コンストラクターの詳細
NimbusJwtDecoder
public NimbusJwtDecoder(com.nimbusds.jwt.proc.JWTProcessor<com.nimbusds.jose.proc.SecurityContext> jwtProcessor) 指定されたパラメーターでNimbusJwtDecoderを構成します- パラメーター:
jwtProcessor- - 使用するJWTProcessor
メソッドの詳細
setJwtValidator
このJwtValidator を使用してください- パラメーター:
jwtValidator- - 使用する Jwt Validator
setClaimSetConverter
public void setClaimSetConverter(org.springframework.core.convert.converter.Converter<MapSE<StringSE, ObjectSE>, MapSE<StringSE, ObjectSE>> claimSetConverter) JWT のクレームセットを操作するには、次のConverterを使用します- パラメーター:
claimSetConverter- 使用するConverter
decode
コンパクトなクレーム表現形式から JWT をデコードして検証する- 次で指定:
- インターフェース
JwtDecoderのdecode - パラメーター:
token- JWT 値- 戻り値:
- 検証済みの
Jwt - 例外:
JwtException- トークンが不正な形式であるか無効である場合
withIssuerLocation
- パラメーター:
issuer- 発行者- 戻り値:
NimbusJwtDecoder.JwkSetUriJwtDecoderBuilder.build()が呼び出されたときに JWK Set URI を導出するNimbusJwtDecoder.JwkSetUriJwtDecoderBuilder- 導入:
- 6.1
- 関連事項:
withJwkSetUri
指定された JWK セット uri を使用します。- パラメーター:
jwkSetUri- 使用する JWK セット uri- 戻り値:
- さらなる構成のための
NimbusJwtDecoder.JwkSetUriJwtDecoderBuilder
withPublicKey
指定された公開鍵を使用して JWT を検証します- パラメーター:
key- 使用する公開鍵- 戻り値:
- さらなる構成のための
NimbusJwtDecoder.PublicKeyJwtDecoderBuilder
withSecretKey
指定されたSecretKeyを使用して、JSON Web 署名(JWS)の MAC を検証します。- パラメーター:
secretKey- MAC の検証に使用されるSecretKey- 戻り値:
- さらなる構成のための
NimbusJwtDecoder.SecretKeyJwtDecoderBuilder