我遵循这个post来实现IdentityServer4。我的问题是,在ProfileService in problem中,GetProfileDataAsync IEnumerable context.RequestedClaimTypes是空的。我是否应该更改邮递员的要求,以要求某些索赔类型?如果context.RequestedClaimTypes包含索赔类型,我能做什么?
我的邮递员请求如下:
Post http://localhost:57577/connect/token
Authorization: Basic Z2xvYmFsX2F...
Body (x-www-form-urlencoded):
username:user@gmail.com
password:pass
grant_type:password
scope:my_api发布于 2017-08-08 17:10:32
就像你跟踪的帖子一样,你必须在你的scope中请求它。您可以将profile email添加到其中,然后您应该得到这些声明。确保您也将它们添加到AllowedScopes下的客户端配置(AllowedScopes)中。
https://stackoverflow.com/questions/45564793
复制相似问题