如何使用Thinktecture.IdentityServer.45在令牌中返回多个身份?
问题描述:
在Thinktecture.IdentityModel.45库,我可以通过执行这样的事情得到一个Microsoft.IdentityModel.Claims.ClaimsIdentityCollection
:如何使用Thinktecture.IdentityServer.45在令牌中返回多个身份?
Dim handler = New JsonWebTokenHandler()
handler.Configuration = config ' set elsewhere
Dim identities = handler.ValidateToken(handler.ReadToken(token))
我们有其中一个用户获取登录,然后选择一个组织而言,这意味着一部分的系统。每个上下文应该代表令牌中可用的内容(每个组织有一组标识,并附有一组特定的声明)。我如何才能让Thinktecture.IdentityServer.45返回包含多个身份的令牌?
答
WIF通常不是为此设计的。只有某些标记类型支持这一点。
我在哪里可以找到哪些令牌类型支持此信息? – CoderDennis 2012-08-10 16:22:03