クラス NimbusJwtDecoder
- java.lang.Object
-
- org.springframework.security.oauth2.jwt.NimbusJwtDecoder
- 実装されているすべてのインターフェース:
JwtDecoder
public final class NimbusJwtDecoder extends java.lang.Object implements JwtDecoder
生の Nimbus 構成をとるJwtDecoderの低レベル Nimbus 実装。- 導入:
- 5.2
ネストされたクラスの要約
ネストされたクラス 修飾子と型 クラス 説明 static classNimbusJwtDecoder.JwkSetUriJwtDecoderBuilderJWK セット uri に基づいてNimbusJwtDecoderインスタンスを作成するためのビルダー。static classNimbusJwtDecoder.PublicKeyJwtDecoderBuilder公開鍵に基づいてNimbusJwtDecoderインスタンスを作成するためのビルダー。static classNimbusJwtDecoder.SecretKeyJwtDecoderBuilderSecretKeyに基づいてNimbusJwtDecoderインスタンスを作成するためのビルダー。
コンストラクターの概要
コンストラクター コンストラクター 説明 NimbusJwtDecoder(com.nimbusds.jwt.proc.JWTProcessor<com.nimbusds.jose.proc.SecurityContext> jwtProcessor)指定されたパラメーターでNimbusJwtDecoderを構成します
メソッドのサマリー
すべてのメソッド 静的メソッド インスタンスメソッド 具象メソッド 修飾子と型 メソッド 説明 Jwtdecode(java.lang.String token)コンパクトなクレーム表現形式から JWT をデコードして検証するvoidsetClaimSetConverter(org.springframework.core.convert.converter.Converter<java.util.Map<java.lang.String,java.lang.Object>,java.util.Map<java.lang.String,java.lang.Object>> claimSetConverter)JWT のクレームセットを操作するには、次のConverterを使用しますvoidsetJwtValidator(OAuth2TokenValidator<Jwt> jwtValidator)このJwtValidator を使用してくださいstatic NimbusJwtDecoder.JwkSetUriJwtDecoderBuilderwithJwkSetUri(java.lang.String jwkSetUri)指定された JWK セット uri を使用します。static NimbusJwtDecoder.PublicKeyJwtDecoderBuilderwithPublicKey(java.security.interfaces.RSAPublicKey key)指定された公開鍵を使用して JWT を検証しますstatic NimbusJwtDecoder.SecretKeyJwtDecoderBuilderwithSecretKey(javax.crypto.SecretKey secretKey)指定されたSecretKeyを使用して、JSON Web 署名(JWS)の MAC を検証します。
コンストラクターの詳細
NimbusJwtDecoder
public NimbusJwtDecoder(com.nimbusds.jwt.proc.JWTProcessor<com.nimbusds.jose.proc.SecurityContext> jwtProcessor)
指定されたパラメーターでNimbusJwtDecoderを構成します- パラメーター:
jwtProcessor- - 使用するJWTProcessor
メソッドの詳細
setJwtValidator
public void setJwtValidator(OAuth2TokenValidator<Jwt> jwtValidator)
このJwtValidator を使用してください- パラメーター:
jwtValidator- - 使用する Jwt Validator
setClaimSetConverter
public void setClaimSetConverter(org.springframework.core.convert.converter.Converter<java.util.Map<java.lang.String,java.lang.Object>,java.util.Map<java.lang.String,java.lang.Object>> claimSetConverter)
JWT のクレームセットを操作するには、次のConverterを使用します- パラメーター:
claimSetConverter- 使用するConverter
decode
public Jwt decode(java.lang.String token) throws JwtException
コンパクトなクレーム表現形式から JWT をデコードして検証する- 次で指定:
- インターフェース
JwtDecoderのdecode - パラメーター:
token- JWT 値- 戻り値:
- 検証済みの
Jwt - 例外:
JwtException
withJwkSetUri
public static NimbusJwtDecoder.JwkSetUriJwtDecoderBuilder withJwkSetUri(java.lang.String jwkSetUri)
指定された JWK セット uri を使用します。- パラメーター:
jwkSetUri- 使用する JWK セット uri- 戻り値:
- さらなる構成のための
NimbusJwtDecoder.JwkSetUriJwtDecoderBuilder
withPublicKey
public static NimbusJwtDecoder.PublicKeyJwtDecoderBuilder withPublicKey(java.security.interfaces.RSAPublicKey key)
指定された公開鍵を使用して JWT を検証します- パラメーター:
key- 使用する公開鍵- 戻り値:
- さらなる構成のための
NimbusJwtDecoder.PublicKeyJwtDecoderBuilder
withSecretKey
public static NimbusJwtDecoder.SecretKeyJwtDecoderBuilder withSecretKey(javax.crypto.SecretKey secretKey)
指定されたSecretKeyを使用して、JSON Web 署名(JWS)の MAC を検証します。- パラメーター:
secretKey- MAC の検証に使用されるSecretKey- 戻り値:
- さらなる構成のための
NimbusJwtDecoder.SecretKeyJwtDecoderBuilder