私はこのチュートリアルを使用しています: http://www.dotnetopenauth.net/developers/help/programmatic-openid-relying-party/
私の GetResponse() 呼び出しは常に null を返します。また、web.config のホワイト リストに localhost を追加しました。すべてを正しく行ったように感じますが、オンラインで解決策を見つけることができません。openid オブジェクトを見るとデバッグ中です。私は2つの発見サービスを数えています..
JS クリックから以下のメソッドを呼び出します。
[HttpPost]
public void PingOpenID()
{
var openid = new OpenIdRelyingParty();
IAuthenticationResponse response = openid.GetResponse();
if (response != null)
{
switch (response.Status)
{
case AuthenticationStatus.Authenticated:
FormsAuthentication.RedirectFromLoginPage(
response.ClaimedIdentifier, false);
break;
case AuthenticationStatus.Canceled:
ModelState.AddModelError("loginIdentifier",
"Login was cancelled at the provider");
break;
case AuthenticationStatus.Failed:
ModelState.AddModelError("loginIdentifier",
"Login failed using the provided OpenID identifier");
break;
}
}
}