クラス 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 class
NimbusJwtDecoder.JwkSetUriJwtDecoderBuilder
JWK セット uri に基づいてNimbusJwtDecoder
インスタンスを作成するためのビルダー。static class
NimbusJwtDecoder.PublicKeyJwtDecoderBuilder
公開鍵に基づいてNimbusJwtDecoder
インスタンスを作成するためのビルダー。static class
NimbusJwtDecoder.SecretKeyJwtDecoderBuilder
SecretKey
に基づいてNimbusJwtDecoder
インスタンスを作成するためのビルダー。
コンストラクターの概要
コンストラクター コンストラクター 説明 NimbusJwtDecoder(com.nimbusds.jwt.proc.JWTProcessor<com.nimbusds.jose.proc.SecurityContext> jwtProcessor)
指定されたパラメーターでNimbusJwtDecoder
を構成します
メソッドのサマリー
すべてのメソッド 静的メソッド インスタンスメソッド 具象メソッド 修飾子と型 メソッド 説明 Jwt
decode(java.lang.String token)
コンパクトなクレーム表現形式から JWT をデコードして検証する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
を使用しますvoid
setJwtValidator(OAuth2TokenValidator<Jwt> jwtValidator)
このJwt
Validator を使用してくださいstatic NimbusJwtDecoder.JwkSetUriJwtDecoderBuilder
withJwkSetUri(java.lang.String jwkSetUri)
指定された JWK セット uri を使用します。static NimbusJwtDecoder.PublicKeyJwtDecoderBuilder
withPublicKey(java.security.interfaces.RSAPublicKey key)
指定された公開鍵を使用して JWT を検証しますstatic NimbusJwtDecoder.SecretKeyJwtDecoderBuilder
withSecretKey(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)
このJwt
Validator を使用してください- パラメーター:
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