WSO2 API Manager 4 - 当范围是共享范围而不是“openid”时,如何在 X-JWT-Assertion 令牌中添加声明

发布于 2025-01-12 04:13:45 字数 589 浏览 2 评论 0原文

我正在使用一些共享范围来限制对我已发布的 API 资源的访问。

现在我尝试在后端的 X-JWT-Assertion 标头中添加用户信息:例如用户电子邮件。因此,标准声明方言中已经存在的声明。

我发现该帖子是我正在尝试做的事情的一个示例,但它仅适用于范围“opendid”。

https://jabhax.medium.com/add-claims-to-jwt-for-wso2-apim-using-inbuilt-gateway-jwtgenerator-393b0bf873b3

我尝试将我的共享范围添加为新的 OIDC Carbon 控制台中的作用域,但错误消息表明它已经存在,即使它没有显示在 GUI 中(我猜共享作用域和 OIDC 作用域存储在数据库中的同一个表中)

当范围不是“openid”而是我自己的共享范围时,如何在后端收到的 X-JWT-Assertion 标头中添加用户信息?

I am using some Shared Scopes to restrict access to ressources of my published APIs.

Now I am trying to add user information in the header X-JWT-Assertion for the backend : user email for instance. So a claim that is already existing in the standard claims dialect.

I found that post as an example of what I am trying to do, but it is only working with scope 'opendid'.

https://jabhax.medium.com/add-claims-to-jwt-for-wso2-apim-using-inbuilt-gateway-jwtgenerator-393b0bf873b3

I tried to add my Shared Scopes as new OIDC scope in Carbon console, but an error message is saying that it is already existing even if it is not displayed in the GUI (I guess Shared Scopes and OIDC scopes are stored in the same table in DB)

How can I add user information inside X-JWT-Assertion headerreceived by the backend when scope is not "openid" but my own Shared Scope ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文