summaryrefslogtreecommitdiffstats
path: root/projecttemplates/MvcRelyingParty/Controllers/AccountController.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2010-03-07 11:04:35 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2010-03-07 11:04:35 -0800
commit6cbab4a751c1c739b93859f2190a0d114c73f398 (patch)
treec07e8d57d4ef55986a9139bdff4d5ad7edbbd9a1 /projecttemplates/MvcRelyingParty/Controllers/AccountController.cs
parent8ce3d28d5d50aff215d18bf789ca4f6d4a63df09 (diff)
downloadDotNetOpenAuth-6cbab4a751c1c739b93859f2190a0d114c73f398.zip
DotNetOpenAuth-6cbab4a751c1c739b93859f2190a0d114c73f398.tar.gz
DotNetOpenAuth-6cbab4a751c1c739b93859f2190a0d114c73f398.tar.bz2
The entire login process now works, in a limited fashion.
Diffstat (limited to 'projecttemplates/MvcRelyingParty/Controllers/AccountController.cs')
-rw-r--r--projecttemplates/MvcRelyingParty/Controllers/AccountController.cs17
1 files changed, 15 insertions, 2 deletions
diff --git a/projecttemplates/MvcRelyingParty/Controllers/AccountController.cs b/projecttemplates/MvcRelyingParty/Controllers/AccountController.cs
index f6f4275..e5a5e7a 100644
--- a/projecttemplates/MvcRelyingParty/Controllers/AccountController.cs
+++ b/projecttemplates/MvcRelyingParty/Controllers/AccountController.cs
@@ -3,6 +3,7 @@
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
+ using System.Net;
using System.Security.Principal;
using System.Web;
using System.Web.Mvc;
@@ -128,8 +129,20 @@
/// hack attempts and result in errors when validation is turned on.
/// </remarks>
[AcceptVerbs(HttpVerbs.Get | HttpVerbs.Post), ValidateInput(false)]
- public ActionResult LogOnReturnTo() {
- var response = this.RelyingParty.GetResponse();
+ public ActionResult LogOnReturnTo(string openid_openidAuthData) {
+ IAuthenticationResponse response;
+ if (!string.IsNullOrEmpty(openid_openidAuthData)) {
+ var auth = new Uri(openid_openidAuthData);
+ var headers = new WebHeaderCollection();
+ foreach (string header in Request.Headers) {
+ headers[header] = Request.Headers[header];
+ }
+ // Always say it's a GET since the payload is all in the URL, even the large ones.
+ HttpRequestInfo clientResponseInfo = new HttpRequestInfo("GET", auth, auth.PathAndQuery, headers, null);
+ response = this.RelyingParty.GetResponse(clientResponseInfo);
+ } else {
+ response = this.RelyingParty.GetResponse();
+ }
if (response != null) {
switch (response.Status) {
case AuthenticationStatus.Authenticated: