Project DescriptionASP.NET WebControl to easily integrate Information Cards into ASP.NET applications
see here for documentation:
http://www.leastprivilege.com/IdentityModel/InfoCardSelector/documentation.aspx This control makes adding support for Information Cards as easy as:
<lp:InfoCardSelector runat="server" ID="_selector" AutoPostback="true"
AutoDecryptToken="true" OnTokenSubmitted="_selector_TokenSubmitted">
<lp:ClaimType Name="Email" />
<lp:ClaimType Name="Surname" />
<lp:ClaimType Name="GivenName" />
<lp:ClaimType Name="PPID" />
</lp:InfoCardSelector>
The event handler uses this simple pattern:
protected void _selector_TokenSubmitted(object sender, TokenSubmittedEventArgs e)
{
if (e.Exception == null)
{
_txtEncryptedToken.Text = e.EncryptedToken;
_txtPlainTextToken.Text = e.Token.DecryptedToken;
Token = e.Token;
}
else
{
// error handling
}
}