如何通过Java JWT API验证Json Web令牌(JWT)?
我不熟悉oauth和JSON Web令牌(jwt)。我试图通过JavaJWTAPI()验证授权令牌(jwt)。我能够通过该API解码报头和有效负载,但无法验证令牌 我对这个领域知之甚少,我认为我必须将jwks-rs-javaapi()添加到我的测试项目中,以便处理验证部分,所以我根据我阅读的文档导入并运行了以下语句 “oauth_服务器_域”是Oracle Access Manager(oam) 然后我得到了以下例外:如何通过Java JWT API验证Json Web令牌(JWT)?,jwt,Jwt,我不熟悉oauth和JSON Web令牌(jwt)。我试图通过JavaJWTAPI()验证授权令牌(jwt)。我能够通过该API解码报头和有效负载,但无法验证令牌 我对这个领域知之甚少,我认为我必须将jwks-rs-javaapi()添加到我的测试项目中,以便处理验证部分,所以我根据我阅读的文档导入并运行了以下语句 “oauth_服务器_域”是Oracle Access Manager(oam) 然后我得到了以下例外: com.auth0.jwk.SigningKeyNotFoundExcept
com.auth0.jwk.SigningKeyNotFoundException: Cannot obtain jwks from url https://<oauth_server_domain>/.well-known/jwks.json
Caused by javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
com.auth0.jwk.SigningKeyNotFoundException:无法从url获取jwkshttps:///.well-known/jwks.json
由javax.net.ssl.SSLHandshakeException引起:sun.security.validator.ValidatorException:PKIX路径生成失败:sun.security.provider.certpath.SunCertPathBuilderException:找不到请求目标的有效证书路径
我试图了解问题本身以及如何纠正它
- 我是否提供了错误的密钥id
- 我是否需要将远程“oauth_服务器_域”的证书导入到我在IDE中构建/执行项目的本地框中
- 如何将./well-known/jwks.json添加到oauth服务器(例如OAM)中
com.auth0.jwk.SigningKeyNotFoundException: Cannot obtain jwks from url https://<oauth_server_domain>/.well-known/jwks.json
Caused by javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target