I am using DotNetOpenAuth to integrate openID into our web application. The code below requests information from the supplier.
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 request. 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 tried: response.ClaimedIdentifier in millions of ways, and it never has any valuable information with which I can do something. Any ideas?
asp.net-mvc openid dotnetopenauth
Geo
source share