IAuthenticationRequest.RedirectToProvider should not return, but it

The method is DotNetOpenAuth.OpenId.RelyingParty.IAuthenticationRequest.RedirectToProvider()documented as never before:

Redirects the user agent to the provider for authentication. The execution of the current page ends after this call.

However, it is returned in accordance with the latest version (3.4.3). I am using the following code:

using (var relayingParty = new OpenIdRelyingParty())
{
  var response = relayingParty.GetResponse();

  if (response == null)
  {
    // Stage 2: user submitting Identifier
    var openId = Request.Form["openId"];
    relayingParty.CreateRequest(openId).RedirectToProvider();

    throw new Exception("Never gets here");
  }

  ...
}

(Line with "Never Comes Here"). I need to return an ActionResult from this method ...

  • Is this a known bug?
  • Is there aorkaround? Should I return EmptyResult?

As far as I understand, this is a mistake - I sent it to the project tracker.

+5
source share
1

ASP.NET MVC, :

using DotNetOpenAuth.Messaging; // required for the extension method to work

    return relyingParty.CreateRequest(openid).RedirectingResponse.AsActionResult();

, ASP.NET RedirectToProvider(), . MVC.

+5

All Articles