I am implementing ADFS for a Silverlight application hosted in the cloud. I am using the Identity model provided in the IdentityTrainingKit to read the claims using Passive Authentication. I am successfully getting all the claims from the STS server in my silverlight. Now, I want to send that ClaimCollection to a WCF service from the silverlight application.
Can you please help me by providing some samples codes, aricles etc on how to do it?
Thanks
I’m assuming that that WCF service is part of your application. In that case, it is not necessary to send the claims from the client to the WCF service. When a user accesses your Silverlight-based application, first the WIF-based web application (so the server side which hosts the Silverlight component(s)) receives the claims from AD FS, and WIF makes them available by returning an IClaimsIdentity or IClaimsPrincipal whenever the current IIdentity or IPrincipal is requested; see for example WIF’s “Integration with IIdentity and IPrincipal”. IClaimsIdentity.Claims then gives you the ClaimCollection.
If the WCF service is a separate service, then it is very difficult to call it from the Silverlight client: the Silverlight version of the .NET framework does not contain enough to support calling a claims-based web service. (It is apparently possible but very convoluted; I could look up the details if desired.) But why not call that WCF service from the server side of your application? That is a standard pattern. (Again, I don’t know the details but could look them up.)