如何解决WSO2 APIM 3.1.0中的JWT
我正在尝试探索WSO2 APIM 3.1.0的JWT功能,该功能将特定的属性(如最终用户/订户和应用程序详细信息)从WSO2 API网关传递到后端。我想知道在哪里可以找到默认的JWT生成器jar或类:“ org.wso2.carbon.apimgt.keymgt.token.JWTGenerator”。我检查了
默认的JWT生成器类发送详细信息,如下所示。我想知道,我们是否可以自定义发送用户/订户角色以及以下详细信息。需要有关此功能的建议。
{
"http://wso2.org/claims/applicationtier": "Unlimited","http://wso2.org/claims/version": "1.0.0","http://wso2.org/claims/keytype": "PRODUCTION","iss": "wso2.org/products/am","http://wso2.org/claims/applicationname": "DefaultApplication","keytype": "PRODUCTION","http://wso2.org/claims/enduser": "john@carbon.super","http://wso2.org/claims/enduserTenantId": "-1234","http://wso2.org/claims/subscriber": "john","http://wso2.org/claims/tier": "Unlimited","scope": "order_pizza","exp": "1597753868867","http://wso2.org/claims/applicationid": "4","http://wso2.org/claims/usertype": "Application_User","consumerKey": "e5syg4saM5hAxDZkUYA1gy2hyy0a","http://wso2.org/claims/apicontext": "/pizzashack/1.0.0"
}
解决方法
您可以在https://apim.docs.wso2.com/en/latest/learn/api-gateway/passing-end-user-attributes-to-the-backend/passing-enduser-attributes-to-the-backend-using-jwt/#passing-enduser-attributes-to-the-backend-using-jwt中找到有关自定义JWT并将最终用户属性传递给使用JWT的后端的信息。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。