MutualCertificate and PPID

Q1. How can I implement certificate authentication in the issue method of SecurityTokenService class (from the Sample STS)? Authentication is required if the security binding for X.509 certificate in app.config is "MutualCertificate".

Q2. How can I retrieve the information of the info card such as the ppid of the card. At least I can use the ppid from the RST for searching the relevant information of the user's claim. I would like to retrieve the ppid value in the issue method of SecurityTokenService class.

Please shed some lights on these issues.

Thanks,

Ronghwa

[659 byte] By [Ronghwa] at [2008-2-7]
# 1

I would do this in the RSTR.cs

public string GetTokenIdentity()
{
AuthorizationContext ctx = OperationContext.Current.ServiceSecurityContext.AuthorizationContext;
foreach (ClaimSet claimset1 in ctx.ClaimSets)
{
//Claim claim1;
foreach (Claim claim1 in claimset1)
{
if (claim1.ClaimType == Constants.IdentityModel.ClaimTypes.wcsPPID)
{
return claim1.Resource.ToString();
}
}

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

Thanks William for showing me how to read for the PPID.

BTW, does anybody know how to implement MutualCertificate security binding in Sample STS?

Thanks,

Ronghwa

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

Software Development for Windows Vista

Site Classified