![](/img/trans.png)
[英]JWT Bearer Keeps returning 401 Status - Bearer error="invalid_token", error_description="The iss claim is not valid"
[英]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.