其實URL是
https://server/federationmetadata/2007-06/federationmetadata.xml
沒有工具,我的認識。可以使用Microsoft.IdentityModel.Protocols.WSFederation.Metadata類或參考Generating Federation Metadata Dynamically。
看一看 「Thinktecture.IdentityServer.v2/src/Libraries/Thinktecture.IdentityServer.Protocols/FederationMetadata」在Thinktecture.IdentityServer.v2。
或者如果您的應用程序使用WIF它在元數據目錄中。
更新:
在WIF,除非你想令牌進行加密,則不需要證書。這對於ADFS來說更是如此,因爲它必須簽署令牌和應用程序。需要公鑰來驗證。
例子:
<?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>
其中localhost \程序\需要將您的應用程序的網址。注意結束斜線!
你能幫忙嗎?你是如何使用這個工具創建聯邦元數據的。我也試過這個工具。它要求提供web.config路徑和URI。之後,有3個選項1.沒有STS 2.創建新的STS(Diasbled)3.使用現有的STS。但爲什麼第二個選項被禁用。 – SUN 2017-04-18 14:51:45
使用第三個選項。輸入您的應用程序web.config文件路徑爲web.config路徑並使用ADFS服務器的元數據url – Mohan 2017-11-13 13:12:44