While working with SharePoint 2010, I am sure that at some point you will need to validate the claims that are being returned when users authenticate. The normal process of doing this is to utilize a web part that renders out the associated claims on a page.
Currently the base web part code can be found over at the Patterns and Practices site:
http://claimsid.codeplex.com/
There are also a couple of blog posts out there that show how to make easier ones such as:
http://blogs.pointbridge.com/Blogs/nielsen_travis/Pages/Post.aspx?_ID=32
http://jopx.blogspot.com/2010/09/building-claims-viewer-webpart-for.html
I normally use the codeplex solution with a few minor changes but recently I have found the "TokenVisualizer" Control. This control was really made for base web sites and not really for SharePoint, but can be used easily. The output is way better than the standard one that we use. So to start download the source code using this link:
http://az12722.vo.msecnd.net/identitytrainingcourse1-6/labs/introtoacslabsv21-2/Source.zip
Once downloaded you will need to create a new solution in Visual Studio and then add that project to it. You will also need to create a new SharePoint project to the solution and set it as a standard web part. Your solution should be something like this:
We now need to add a reference from the "Microsoft.Samples.DPE.Identity.Controls" project to our web part project.
So now we can simply add code to the "CreateChildControls" method of the web part to render the actual control.
Now let's make a quick change to the package so we can add a safe control entry for the control.
Once completed, we can now build and deploy this web part solution and see it in action on our site.
If we now expand it we can see some base details about the claims, this is what we are used to seeing:
Now if we look further down we can get details about the actual SAML token itself.
And underneath that are the basic details about the token, with the ability to download the SSL Certificate being used.
As you can see this is a lot better regarding the details you get back and way more useful when debugging or developing using any type of Claims Authentication.
UPDATED: Link to completed solution file (WSP)
http://blog.helloitsliam.com/Presentations/Helloitsliam.ClaimsViewerWebPart.wsp