![](/img/trans.png)
[英]how can i log username in wso2 logs in case of failed attempt of a user in wso2 identity server
[英]How to get user properties after user log into WSO2 identity server
这是我的步骤
我的 OAuth 端点:https://localhost:9443/oauth2/authorize/?response_type=code&client_id=xxxx&scope=openid&redirect_uri=http://localhost/gatewaytest/Home/WsoCallBack
然后我得到了代码并通过这个“https://localhost:9443/oauth2/token”获得了访问令牌
然后我调用这个端点“https://localhost:9443/oauth2/userinfo?schema=openid”
然后我得到这样的结果 {"sub":"Alexwso1.com"}
我怎样才能获得 email、电话等其他属性
导航到 WSO2 IS 中的服务提供商配置(通过管理控制台的路径:主菜单 -> 服务提供商 -> 列表 -> Select SP),然后展开“声明配置”。
然后在requested claims
部分中为您需要的用户属性添加相应的声明。
通过开始获取授权码、访问令牌和用户信息来重新执行您的流程。 如果您在步骤 (2) 中添加的本地声明映射到http://wso2.org/oidc/claim方言中的 oidc 声明,您将能够获取该用户信息。
否则按照本指南https://medium.com/@inthiraj1994/lets-add-a-custom-claim-to-oidc-in-wso2-is-d871e418d6b0
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.