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:
There are also a couple of blog posts out there that show how to make easier ones such as:
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:
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)