How to create federation metadata XML for “Relying Party Trust” and “Claims Provider Trusts” for ADFS 2.0

后端 未结 4 740
故里飘歌
故里飘歌 2021-01-30 23:12

One of our web app would like to connect with ADFS 2.0 server to get credential token and check the user roles based on that. The ADFS server admin asked us to

4条回答
  •  感动是毒
    2021-01-30 23:18

    Actually the URL is

    https://server/federationmetadata/2007-06/federationmetadata.xml
    

    There are no tools that I an aware of.

    You can use the Microsoft.IdentityModel.Protocols.WSFederation.Metadata class or refer Generating Federation Metadata Dynamically.

    Have a look at "Thinktecture.IdentityServer.v2 / src / Libraries / Thinktecture.IdentityServer.Protocols / FederationMetadata" over at Thinktecture.IdentityServer.v2.

    Or if your application uses WIF it's in the metadata directory.

    Update:

    In WIF, unless you want to the token to be encrypted, you don't need the certificate. That's more for the ADFS side as it has to sign the token and the app. needs the public key to verify.

    Example:

    
    
        
            
                
                
            
            
                
                    
    http://localhost/app/
    http://localhost/app/

    where localhost\app\ needs to be your app's URL. Note end slash!

提交回复
热议问题