【发布时间】:2016-10-17 01:40:51
【问题描述】:
这是我之前的问题here 的后续问题。我的问题是关于当我查询自定义 UserInfoEndpoint 时,我希望来自我的访问令牌(在请求中作为不记名令牌发送)的声明成为上下文 ProfileDataRequestContext 的一部分。问题是它们不是,特别是我希望 ticket 声明在上下文中,但是上下文是空的(sub 除外,据我所知它始终存在)。
请参阅我之前关于实施的问题,因为我不想在这里重新发布所有内容。
提前谢谢...
日志供参考...
2016-06-15 13:52:11.508 -05:00 [Information] Creating userinfo response
2016-06-15 13:52:11.513 -05:00 [Information] Scopes in access token: "app openid offline_access appaccess"
2016-06-15 13:52:11.514 -05:00 [Information] Requested claim types: "applicationDto sub"
2016-06-15 13:52:11.514 -05:00 [Debug] Getting ProfileDataAsync
2016-06-15 13:52:11.514 -05:00 [Debug] The claims in the context...
2016-06-15 13:52:11.514 -05:00 [Debug] Claims sub 783bf872-b864-4042-853d-04fbcb7a505a
2016-06-15 13:52:11.514 -05:00 [Debug] The requseted claims...
2016-06-15 13:52:11.514 -05:00 [Debug] Cliams applicationDto
2016-06-15 13:52:11.514 -05:00 [Debug] Cliams sub
2016-06-15 13:52:11.514 -05:00 [Debug] Finished ProfileDataAsync
2016-06-15 13:52:11.514 -05:00 [Information] Profile service returned to the following claim types: "sub"
2016-06-15 13:52:11.514 -05:00 [Information] End userinfo request
2016-06-15 13:52:11.516 -05:00 [Information] Returning userinfo response.
更新: 在github讨论了这个问题,确定不支持,建议我把ticket放到id_token里面,但是还是不能解决问题。
有什么方法可以让ticket 声明作为 UserInfoEndpoint 中上下文的一部分?
更新后的日志...
2016-06-16 12:23:08.023 -05:00 [Information] Creating userinfo response
2016-06-16 12:23:08.027 -05:00 [Information] Scopes in access token: "app openid offline_access appaccess"
2016-06-16 12:23:08.028 -05:00 [Information] Requested claim types: "applicationDto sub ticket"
2016-06-16 12:23:08.028 -05:00 [Debug] Getting ProfileDataAsync
2016-06-16 12:23:08.028 -05:00 [Debug] Claims in Claims in the context...
2016-06-16 12:23:08.028 -05:00 [Debug] "sub : 783bf872-b864-4042-853d-04fbcb7a505a"
2016-06-16 12:23:08.028 -05:00 [Debug] Claims in Requested Claims...
2016-06-16 12:23:08.028 -05:00 [Debug] "applicationDto"
2016-06-16 12:23:08.028 -05:00 [Debug] "sub"
2016-06-16 12:23:08.028 -05:00 [Debug] "ticket"
2016-06-16 12:23:08.028 -05:00 [Debug] Claims in Issued Claims...
2016-06-16 12:23:08.028 -05:00 [Debug] "sub : 783bf872-b864-4042-853d-04fbcb7a505a"
2016-06-16 12:23:08.028 -05:00 [Debug] Finished ProfileDataAsync
【问题讨论】:
标签: c# .net oauth-2.0 identityserver3