ADFS忽略了我的要求要求
问题描述:
我得到通过wsfed用户ADFS的详细信息,通过: https://github.com/auth0/passport-wsfed-saml2ADFS忽略了我的要求要求
,我只得到填充NameID。
metadata.xml中(我的服务器地址与http://localhost/app/更换,在HTTPS是跑):
<?xml version="1.0" encoding="utf-8"?>
<EntityDescriptor ID="_5b6cd05c-a5e3-470d-a2fc-6c6f66633d1b" entityID="http://localhost/app/" xmlns="urn:oasis:names:tc:SAML:2.0:metadata">
<RoleDescriptor xsi:type="fed:ApplicationServiceType" xmlns:fed="http://docs.oasis-open.org/wsfed/federation/200706" protocolSupportEnumeration="http://docs.oasis-open.org/wsfed/federation/200706" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<fed:ClaimTypesRequested>
<auth:ClaimType Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name" Optional="true" xmlns:auth="http://docs.oasis-open.org/wsfed/authorization/200706" />
<auth:ClaimType Uri="http://schemas.microsoft.com/ws/2008/06/identity/claims/role" Optional="true" xmlns:auth="http://docs.oasis-open.org/wsfed/authorization/200706" />
</fed:ClaimTypesRequested>
<fed:TargetScopes>
<EndpointReference xmlns="http://www.w3.org/2005/08/addressing">
<Address>http://localhost/app/</Address>
</EndpointReference>
</fed:TargetScopes>
<fed:PassiveRequestorEndpoint>
<EndpointReference xmlns="http://www.w3.org/2005/08/addressing">
<Address>http://localhost/app/</Address>
</EndpointReference>
</fed:PassiveRequestorEndpoint>
</RoleDescriptor>
</EntityDescriptor>
甚至每当我取代“可选”,以虚假它不返回任何索赔。 为什么ADFS忽略我的说法?
答
您是否期待ADFS从“ClaimTypesRequested”派生出索赔?
ADFS的工作方式是声明来源于在ADFS中配置的声明规则。
您配置了哪些声明规则?
我期望我提到的具体索赔将返回到回调。如果我提到“角色”,我希望在响应中获得角色属性。我无法指定我想从ADFS回来的数据吗? – adfsdoesntwork
您可以但决定性因素是在ADFS上配置的声明规则。没有索赔规则 - 没有索赔。 – nzpcmad