diff options
Diffstat (limited to 'samples/OpenIdRelyingPartyMvc/Controllers/UserController.cs')
-rw-r--r-- | samples/OpenIdRelyingPartyMvc/Controllers/UserController.cs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/samples/OpenIdRelyingPartyMvc/Controllers/UserController.cs b/samples/OpenIdRelyingPartyMvc/Controllers/UserController.cs index 3ff405f..02f3c3d 100644 --- a/samples/OpenIdRelyingPartyMvc/Controllers/UserController.cs +++ b/samples/OpenIdRelyingPartyMvc/Controllers/UserController.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.Linq; + using System.Threading.Tasks; using System.Web; using System.Web.Mvc; using System.Web.Security; @@ -31,14 +32,16 @@ } [ValidateInput(false)] - public ActionResult Authenticate(string returnUrl) { - var response = openid.GetResponse(); + public async Task<ActionResult> Authenticate(string returnUrl) { + var response = await openid.GetResponseAsync(this.Request, this.Response.ClientDisconnectedToken); if (response == null) { // Stage 2: user submitting Identifier Identifier id; if (Identifier.TryParse(Request.Form["openid_identifier"], out id)) { try { - return openid.CreateRequest(Request.Form["openid_identifier"]).RedirectingResponse.AsActionResult(); + var request = await openid.CreateRequestAsync(Request.Form["openid_identifier"]); + var redirectingResponse = await request.GetRedirectingResponseAsync(this.Response.ClientDisconnectedToken); + return redirectingResponse.AsActionResult(); } catch (ProtocolException ex) { ViewData["Message"] = ex.Message; return View("Login"); |