summaryrefslogtreecommitdiffstats
path: root/projecttemplates/MvcRelyingParty/Controllers/AuthController.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2012-03-05 17:38:00 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2012-03-05 17:38:00 -0800
commit9a3885e6992462122057f532b7cbcda3695ca6bd (patch)
tree679678fe05814b95e8aaf8e3ca441c3410f1c8c5 /projecttemplates/MvcRelyingParty/Controllers/AuthController.cs
parenta292822196d0911a68fc56597ed52a8c84a41cbe (diff)
downloadDotNetOpenAuth-9a3885e6992462122057f532b7cbcda3695ca6bd.zip
DotNetOpenAuth-9a3885e6992462122057f532b7cbcda3695ca6bd.tar.gz
DotNetOpenAuth-9a3885e6992462122057f532b7cbcda3695ca6bd.tar.bz2
Replaced API requirements for HttpRequestInfo with HttpRequestBase (new in .NET 3.5 SP1).
This makes us more friendly to MVC as well as mock-based unit testing.
Diffstat (limited to 'projecttemplates/MvcRelyingParty/Controllers/AuthController.cs')
-rw-r--r--projecttemplates/MvcRelyingParty/Controllers/AuthController.cs11
1 files changed, 3 insertions, 8 deletions
diff --git a/projecttemplates/MvcRelyingParty/Controllers/AuthController.cs b/projecttemplates/MvcRelyingParty/Controllers/AuthController.cs
index 9cc6e15..446c6ac 100644
--- a/projecttemplates/MvcRelyingParty/Controllers/AuthController.cs
+++ b/projecttemplates/MvcRelyingParty/Controllers/AuthController.cs
@@ -121,14 +121,9 @@ namespace MvcRelyingParty.Controllers {
public ActionResult LogOnPostAssertion(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);
+ var auth = new Uri(openid_openidAuthData);
+ HttpRequestBase clientResponseInfo = new HttpRequestInfo("GET", auth, headers: Request.Headers);
response = this.RelyingParty.GetResponse(clientResponseInfo);
} else {
response = this.RelyingParty.GetResponse();
@@ -170,7 +165,7 @@ namespace MvcRelyingParty.Controllers {
}
// 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);
+ HttpRequestBase clientResponseInfo = new HttpRequestInfo("GET", auth, headers: headers);
response = this.RelyingParty.GetResponse(clientResponseInfo);
} else {
response = this.RelyingParty.GetResponse();