I am using DotNetOpenAuth to integrate openID in our web application. The code below requests the information to the provider.
try
{
var req = openid.CreateRequest(Request.Form["openid_identifier"]);
req.AddExtension(new DotNetOpenAuth.OpenId.Extensions.SimpleRegistration.ClaimsRequest
{
Email = DotNetOpenAuth.OpenId.Extensions.SimpleRegistration.DemandLevel.Require,
FullName = DotNetOpenAuth.OpenId.Extensions.SimpleRegistration.DemandLevel.Require,
Nickname = DotNetOpenAuth.OpenId.Extensions.SimpleRegistration.DemandLevel.Request,
PostalCode = DotNetOpenAuth.OpenId.Extensions.SimpleRegistration.DemandLevel.Request
});
return req.RedirectingResponse.AsActionResult();
}
For some reason the response from the openID provider never comes with the information I am requesting. Below is the code:
// Stage 3: OpenID Provider sending assertion response
switch (response.Status) {
case AuthenticationStatus.Authenticated:
Session["FriendlyIdentifier"] = response.FriendlyIdentifierForDisplay;
FormsAuthentication.SetAuthCookie(response.ClaimedIdentifier, false);
if (!string.IsNullOrEmpty(returnUrl)) {
return Redirect(returnUrl);
} else {
return RedirectToAction("Index", "Home");
}
I have tried: response.ClaimedIdentifier in a million ways and it never has valuable information that I can do something with. Any ideas?