gpt4 book ai didi

java - com.nimbusds.jose.RemoteKeySourceException : Couldn't retrieve remote JWK set: Hostname verification failed

转载 作者:行者123 更新时间:2023-12-03 21:29:24 25 4
gpt4 key购买 nike

我正在使用 Nimbus-JOSE-JWT 库(版本 4.39)。使用这个库,我正在尝试进行本地 JWT token 验证,该验证从 OAuth 授权服务器中提取 JWK 集。

我的代码在 JSE 应用程序中运行时运行良好,但是,当我在 WebLogic 12.1.3 中运行完全相同的代码(作为 JEE 应用程序的一部分)时,它无法运行,但出现以下异常:

com.nimbusds.jose.RemoteKeySourceException: Couldn't retrieve remote JWK set: Hostname verification failed: HostnameVerifier=weblogic.security.utils.SSLWLSHostnameVerifier, hostname=corpZ.oktapreview.com.
at com.nimbusds.jose.jwk.source.RemoteJWKSet.updateJWKSetFromURL(RemoteJWKSet.java:141)
at com.nimbusds.jose.jwk.source.RemoteJWKSet.get(RemoteJWKSet.java:219)
at com.nimbusds.jose.proc.JWSVerificationKeySelector.selectJWSKeys(JWSVerificationKeySelector.java:129)
at com.nimbusds.jwt.proc.DefaultJWTProcessor.process(DefaultJWTProcessor.java:323)
at com.nimbusds.jwt.proc.DefaultJWTProcessor.process(DefaultJWTProcessor.java:284)
at com.nimbusds.jwt.proc.DefaultJWTProcessor.process(DefaultJWTProcessor.java:275)
at org.corpZ.sec.okta.OktaClient.getAccessTokenInfoLocally(Unknown Source)
at org.corpZ.sec.okta.OktaClient.validateAccessTokenLocally(Unknown Source)
at org.corpZ.sec.okta.TokenValidator.isTokenValid(Unknown Source)
at org.corpZ.eis.ws.interceptor.WSInterceptor.handleRequest(WSInterceptor.java:126)
at org.springframework.ws.server.endpoint.interceptor.DelegatingSmartEndpointInterceptor.handleRequest(DelegatingSmartEndpointInterceptor.java:78)
at org.springframework.ws.server.MessageDispatcher.dispatch(MessageDispatcher.java:224)
at org.springframework.ws.server.MessageDispatcher.receive(MessageDispatcher.java:173)
at org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:88)
at org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:59)
at org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:292)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
at javax.servlet.http.HttpServlet.service(HttpServ

以下是我的代码中的 Maven 依赖项:
<dependency>
<groupId>com.nimbusds</groupId>
<artifactId>nimbus-jose-jwt</artifactId>
<version>4.39</version>
</dependency>

任何帮助都感激不尽。

谢谢。

最佳答案

迟到总比不到好,这是由于 WebLogic 服务器配置。您必须进入 SSL 属性选项卡,并将“主机名验证”更改为“无”。

关于java - com.nimbusds.jose.RemoteKeySourceException : Couldn't retrieve remote JWK set: Hostname verification failed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45179924/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com