【发布时间】:2016-12-26 17:17:15
【问题描述】:
我收到索赔 输入身份,如this。
我只想将友好名称“AdLogon”作为我的声明类型。 我知道我们可以通过操作字符串来做到这一点,但是有什么标准方法可以做到这一点。
【问题讨论】:
标签: asp.net asp.net-identity wif claims-based-identity asp.net-identity-2
我收到索赔 输入身份,如this。
我只想将友好名称“AdLogon”作为我的声明类型。 我知道我们可以通过操作字符串来做到这一点,但是有什么标准方法可以做到这一点。
【问题讨论】:
标签: asp.net asp.net-identity wif claims-based-identity asp.net-identity-2
正常的声明规则是这样的形式,例如:
c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"] => issue(store = "Active Directory", types = ("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"), query = ";mail;{0}", param = c.Value);
你想要类似的东西:
c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"] => issue(store = "Active Directory", types = ("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/AdLogon"), query = ";[some attribute];{0}", param = c.Value);
要获得“AdLogon”,请使用:
c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"] => issue(store = "Active Directory", types = ("AdLogon"), query = ";[some attribute];{0}", param = c.Value);
【讨论】: