繁体   English   中英

Iss 声明无效 Keycloak

[英]Iss claim not valid Keycloak

我使用 keycloak 服务登录我的网络应用程序。 用作具有 oauth 2.0 安全性的后端弹簧。 当我使用从 keycloak 获得的不记名令牌向邮递员发出请求时,它给了我一个错误 401,并且在www-Authenticate条目旁边的答案文本中它告诉我:

Bearer error="invalid_token", error_description="An error occurred while attempting to decode the Jwt: The iss claim is not valid", error_uri="https://tools.ietf.org/html/rfc6750#section-3.1"

我该如何解决这个问题?

Spring 配置值必须与iss声明值完全相同。 即使是尾随斜杠(如果有的话)也很重要。

正如@BenchVue 在评论中所写:在 jwt.io 中打开一个访问令牌 JWT,复制iss声明值并将其粘贴到 spring conf 中。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM