Update: updated version here.
I did another slight modification to my CardSpace control (see here and here) – it now fires a TokenSubmitted event where it passes the encrypted token back to the page. This makes for a nicer programming model.
The tag could look like this:
<lp:CardSpaceSelector runat="server" ID="_selector" AutoPostback="true"
IssuerType="SelfIssued" OnTokenSubmitted="_selector_TokenSubmitted"> <lp:ClaimType Name="Email" /> <lp:ClaimType Name="Surname" /> <lp:ClaimType Name="PPID" /> <lp:ClaimType Type="Custom" CustomName="http://foo" IsOptional="true" /> </lp:CardSpaceSelector>
And the corresponding code:
protected void _selector_TokenSubmitted(object sender, TokenSubmittedEventArgs e) { try { // parse and decrypt the token Token token = new Token(e.Token); ... } catch (Exception ex) { ... } }
Have fun!
CardSpaceSelectorV2.1.zip (48.28 KB)