クラス NimbusReactiveJwtDecoder
- java.lang.Object
-
- org.springframework.security.oauth2.jwt.NimbusReactiveJwtDecoder
- 実装されたすべてのインターフェース:
ReactiveJwtDecoder
public final class NimbusReactiveJwtDecoder extends java.lang.Object implements ReactiveJwtDecoder
「デコード」するReactiveJwtDecoder
の実装。JSON Web トークン(JWT)。さらに、JWT が JSON Web 署名(JWS)である場合、そのデジタル署名を検証します。注意 : この実装では、Nimbus JOSE + JWT SDK を内部的に使用します。
- 導入:
- 5.1
- 関連事項:
ReactiveJwtDecoder
, JSON Web トークン (JWT) , JSON Web 署名 (JWS) , JSON Web キー (JWK) , Nimbus JOSE + JWT SDK
ネストされたクラスのサマリー
ネストされたクラス 修飾子と型 クラス 説明 static class
NimbusReactiveJwtDecoder.JwkSetUriReactiveJwtDecoderBuilder
JWK セット uri に基づいてNimbusReactiveJwtDecoder
インスタンスを作成するためのビルダー。static class
NimbusReactiveJwtDecoder.JwkSourceReactiveJwtDecoderBuilder
NimbusReactiveJwtDecoder
インスタンスを作成するためのビルダー。static class
NimbusReactiveJwtDecoder.PublicKeyReactiveJwtDecoderBuilder
公開鍵に基づいてNimbusReactiveJwtDecoder
インスタンスを作成するためのビルダー。static class
NimbusReactiveJwtDecoder.SecretKeyReactiveJwtDecoderBuilder
SecretKey
に基づいてNimbusReactiveJwtDecoder
インスタンスを作成するためのビルダー。
コンストラクターのサマリー
コンストラクター コンストラクター 説明 NimbusReactiveJwtDecoder(java.lang.String jwkSetUrl)
指定されたパラメーターを使用してNimbusReactiveJwtDecoder
を構築します。NimbusReactiveJwtDecoder(java.security.interfaces.RSAPublicKey publicKey)
指定されたパラメーターを使用してNimbusReactiveJwtDecoder
を構築します。NimbusReactiveJwtDecoder(org.springframework.core.convert.converter.Converter<com.nimbusds.jwt.JWT,reactor.core.publisher.Mono<com.nimbusds.jwt.JWTClaimsSet>> jwtProcessor)
指定されたパラメーターを使用してNimbusReactiveJwtDecoder
を構築します。
メソッドのサマリー
すべてのメソッド 静的メソッド インスタンスメソッド 具象メソッド 修飾子と型 メソッド 説明 reactor.core.publisher.Mono<Jwt>
decode(java.lang.String token)
JWT をそのコンパクトなクレーム表現形式からデコードし、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)
付属のOAuth2TokenValidator
を使用して、受信Jwt
を検証します。static NimbusReactiveJwtDecoder.JwkSetUriReactiveJwtDecoderBuilder
withJwkSetUri(java.lang.String jwkSetUri)
指定された JWK セット uri を使用して、JWT を検証します。static NimbusReactiveJwtDecoder.JwkSourceReactiveJwtDecoderBuilder
withJwkSource(java.util.function.Function<com.nimbusds.jwt.SignedJWT,reactor.core.publisher.Flux<com.nimbusds.jose.jwk.JWK>> source)
指定されたFunction
を使用して JWT を検証しますstatic NimbusReactiveJwtDecoder.PublicKeyReactiveJwtDecoderBuilder
withPublicKey(java.security.interfaces.RSAPublicKey key)
指定された公開鍵を使用して JWT を検証しますstatic NimbusReactiveJwtDecoder.SecretKeyReactiveJwtDecoderBuilder
withSecretKey(javax.crypto.SecretKey secretKey)
指定されたSecretKey
を使用して、JSON Web 署名(JWS)の MAC を検証します。
コンストラクターの詳細
NimbusReactiveJwtDecoder
public NimbusReactiveJwtDecoder(java.lang.String jwkSetUrl)
指定されたパラメーターを使用してNimbusReactiveJwtDecoder
を構築します。- パラメーター:
jwkSetUrl
- JSON Web キー(JWK)セットURL
NimbusReactiveJwtDecoder
public NimbusReactiveJwtDecoder(java.security.interfaces.RSAPublicKey publicKey)
指定されたパラメーターを使用してNimbusReactiveJwtDecoder
を構築します。- パラメーター:
publicKey
- 署名の検証に使用されるRSAPublicKey
- 導入:
- 5.2
NimbusReactiveJwtDecoder
public NimbusReactiveJwtDecoder(org.springframework.core.convert.converter.Converter<com.nimbusds.jwt.JWT,reactor.core.publisher.Mono<com.nimbusds.jwt.JWTClaimsSet>> jwtProcessor)
指定されたパラメーターを使用してNimbusReactiveJwtDecoder
を構築します。- パラメーター:
jwtProcessor
- 署名された Jwt を処理および検証し、Jwt クレームセットを返すために使用されるConverter
- 導入:
- 5.2
メソッドの詳細
setJwtValidator
public void setJwtValidator(OAuth2TokenValidator<Jwt> jwtValidator)
付属のOAuth2TokenValidator
を使用して、受信Jwt
を検証します。- パラメーター:
jwtValidator
- 使用するOAuth2TokenValidator
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 reactor.core.publisher.Mono<Jwt> decode(java.lang.String token) throws JwtException
インターフェースからコピーされた説明:ReactiveJwtDecoder
JWT をそのコンパクトなクレーム表現形式からデコードし、Jwt
を返します。- 次で指定:
- インターフェース
ReactiveJwtDecoder
のdecode
- パラメーター:
token
- JWT 値- 戻り値:
Jwt
- 例外:
JwtException
- JWT のデコード中にエラーが発生した場合
withJwkSetUri
public static NimbusReactiveJwtDecoder.JwkSetUriReactiveJwtDecoderBuilder withJwkSetUri(java.lang.String jwkSetUri)
指定された JWK セット uri を使用して、JWT を検証します。- パラメーター:
jwkSetUri
- 使用する JWK セット uri- 戻り値:
- さらなる構成のための
NimbusReactiveJwtDecoder.JwkSetUriReactiveJwtDecoderBuilder
- 導入:
- 5.2
withPublicKey
public static NimbusReactiveJwtDecoder.PublicKeyReactiveJwtDecoderBuilder withPublicKey(java.security.interfaces.RSAPublicKey key)
指定された公開鍵を使用して JWT を検証します- パラメーター:
key
- 使用する公開鍵- 戻り値:
- さらなる構成のための
NimbusReactiveJwtDecoder.PublicKeyReactiveJwtDecoderBuilder
- 導入:
- 5.2
withSecretKey
public static NimbusReactiveJwtDecoder.SecretKeyReactiveJwtDecoderBuilder withSecretKey(javax.crypto.SecretKey secretKey)
指定されたSecretKey
を使用して、JSON Web 署名(JWS)の MAC を検証します。- パラメーター:
secretKey
- MAC の検証に使用されるSecretKey
- 戻り値:
- さらなる構成のための
NimbusReactiveJwtDecoder.SecretKeyReactiveJwtDecoderBuilder
- 導入:
- 5.2
withJwkSource
public static NimbusReactiveJwtDecoder.JwkSourceReactiveJwtDecoderBuilder withJwkSource(java.util.function.Function<com.nimbusds.jwt.SignedJWT,reactor.core.publisher.Flux<com.nimbusds.jose.jwk.JWK>> source)
指定されたFunction
を使用して JWT を検証します- パラメーター:
source
-Function
- 戻り値:
- さらなる構成のための
NimbusReactiveJwtDecoder.JwkSourceReactiveJwtDecoderBuilder
- 導入:
- 5.2