Я использую Dotnetopenid для моего решения openid, все хорошо, когда используется встроенный пользовательский элемент управления, но когда я хочу реализовать его программно, как в приведенном ниже коде,
openid.Response.GetExtension<DotNetOpenId.Extensions.SimpleRegistration.ClaimsResponse>();
всегда равно нулю.
есть идеи?
OpenIdRelyingParty openid = createRelyingParty();
if (openid.Response != null) {
switch (openid.Response.Status) {
case AuthenticationStatus.Authenticated:
// This is where you would look for any OpenID extension responses included
// in the authentication assertion.
// var extension = openid.Response.GetExtension<SomeExtensionResponseType>();
// Use FormsAuthentication to tell ASP.NET that the user is now logged in,
// with the OpenID Claimed Identifier as their username.
State.ProfileFields = openid.Response.GetExtension<DotNetOpenId.Extensions.SimpleRegistration.ClaimsResponse>();
FormsAuthentication.RedirectFromLoginPage(openid.Response.ClaimedIdentifier, false);
break;