New Sample: Simple STS

I've posted another sample, this time a Simple STS!

With that you should be able to do complete end-to-end scenario testing with CardSpace. It's pretty darn lightweight, and doesn't provide a whole lot of anything, but it's simple enough to understand without too much effort.

http://cardspace.netfx3.com/files/folders/samples-july-ctp/entry5204.aspx

g


Garrett Serack | Program Manager |Federated Identity Team | Microsoft Corporation
blog:http://blogs.msdn.com/garretts

[1293 byte] By [GarrettSerack-MSFT] at [2008-2-5]
# 1

Errata #1:

if you downloaded the sample before 8:30PM PST AUG 21 2006, there is one little error.

In the Sample.htm file in the website\cardspace directory, the object tag should read:

<object type="application/x-informationcard" name="_xmlToken">
<param name="tokenType" value="urn:oasis:names:tc:SAML:1.0:assertion"
/>
<param name="requiredClaims" value="http://schemas.microsoft.com/ws/2005/05/identity/claims/privatepersonalidentifier"
/>
</object>

Errata #2:

if you downloaded the sample before 8:30AM PST AUG 22 2006, the script to set the SSL Certificate is missing:

httpcfg set ssl -i 0.0.0.0:7001 -h "d47de657fa4902555902cb7f0edd2ba9b05debb8"

g


Garrett Serack | Program Manager |Federated Identity Team | Microsoft Corporation
blog:http://blogs.msdn.com/garretts

GarrettSerack-MSFT at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows CardSpace (InfoCard)...
# 2

Hi Garrett,

I've followed the instruction and created the "My Card (self-backed)" card. When I tried to get the managed token (by removing hte requiredClaims), the system prompted: "The personal card that is used for authentication of the managed card cannot be found". Any suggestions?

LTChia at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows CardSpace (InfoCard)...
# 3

Did you place the PPID (Not the UniqueID!) from your own Personal Card into the card template .INI file?

Verifiy this by renaming the .CRD file to .CRD.XML and opening it in IE.

You can scan down to find the PPID:

Look For:

<UserCredential>

<SelfIssuedCredential>

<PrivatePersonalIdentifier>yfVRWjKItIwGtpK1ZFecf4d5CHryps+hjWJpXGReVaw=</PrivatePersonalIdentifier>

</SelfIssuedCredential>

</UserCredential>

Your PPID should be different--obviously.

Garrett

GarrettSerack-MSFT at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows CardSpace (InfoCard)...
# 4

Seems to be another errata from what I have downloaded and seen:

protected void Page_Load(object sender, EventArgs e)
{
string xmlToken;
xmlToken = Request.Params["xmlToken"];
if (xmlToken == null || xmlToken.Equals(""))
{
ShowError("Token presented was null");
}
else
{
Token token= new Token(xmlToken);
//givenname.Text = token.Claims[ClaimTypes.GivenName];
//surname.Text = token.Claims[ClaimTypes.Surname];
//email.Text = token.Claims[ClaimTypes.Email];
ppid.Text = token.Claims[ClaimTypes.PPID];
uid.Text = token.UniqueID;
}

}
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Login Page</title>
</head>
<body>
<form id="form1" runat="server">
<div runat="server" id="fields">
Given Name:<asp:Label ID="givenname" runat="server" Text=""></asp:Label><br/>
Surname:<asp:Label ID="surname" runat="server" Text=""></asp:Label><br/>
Email Address:<asp:Label ID="email" runat="server" Text=""></asp:Label><br/>
PPID:<asp:Label ID="ppid" runat="server" Text=""></asp:Label><br/>
Unique ID:<asp:Label ID="uid" runat="server" Text=""></asp:Label><br/>
</div>
<div runat="server" id="errors" visible="false">
Error:<asp:Label ID="errtext" runat="server" Text=""></asp:Label><br/>
</div>

</form>

Since the sample html is not asking for the GivenName,Surname and Email claims but just the PPID, then the processing page will need to have the above bold updated.

The uniqueID of this token, in this sample, is NOT the same as the PPID.

Softwaremaker at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows CardSpace (InfoCard)...
# 5

ARRG!

<hangs head>
I must now wear the stone of shame
</hangs head>

I must have missed that aspx as well.

Sorry folks, Softwaremaker's right.

Garrett

GarrettSerack-MSFT at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows CardSpace (InfoCard)...
# 6

It would have been nice to see the sample files updated.

This would have saved me and others the time having to search and fix the issues of the sample files on .net 3.0 RC1.

veugelenw at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows CardSpace (InfoCard)...

Software Development for Windows Vista

Site Classified