Reputation: 1187
Is there any easy way, such as some WIF class or something which given a FederationMetadata.xml file from an identity provider, you can easily load this and parse it to access certain parts of information out of the file.
I need to be able to parse it for things like the claims and signing token etc, so that given a supplied FederationMetadata.xml file I can set up an identity provider, rule group and rules using the ACS Management Service.
I could probably knock together an xmlreader to read through it, but just wondered if there was an easier way.
Upvotes: 0
Views: 1237
Reputation: 7435
Look into the MetadataSerializer class. It has APIs to read the metadata and gives you back an object model for the metadata. Docs are here:
http://msdn.microsoft.com/en-us/library/system.identitymodel.metadata.metadataserializer.aspx
Upvotes: 4