summaryrefslogtreecommitdiffstats
path: root/projecttemplates
diff options
context:
space:
mode:
Diffstat (limited to 'projecttemplates')
-rw-r--r--projecttemplates/MvcRelyingParty/Code/OpenIdRelyingPartyService.cs4
-rw-r--r--projecttemplates/MvcRelyingParty/Controllers/AuthController.cs11
-rw-r--r--projecttemplates/MvcRelyingParty/OAuthTokenEndpoint.ashx.cs2
-rw-r--r--projecttemplates/RelyingPartyLogic/OAuthAuthenticationModule.cs2
-rw-r--r--projecttemplates/RelyingPartyLogic/RelyingPartyLogic.csproj1
-rw-r--r--projecttemplates/WebFormsRelyingParty/OAuthTokenEndpoint.ashx.cs2
-rw-r--r--projecttemplates/WebFormsRelyingParty/WebFormsRelyingParty.csproj1
7 files changed, 10 insertions, 13 deletions
diff --git a/projecttemplates/MvcRelyingParty/Code/OpenIdRelyingPartyService.cs b/projecttemplates/MvcRelyingParty/Code/OpenIdRelyingPartyService.cs
index 7931200..30f3fae 100644
--- a/projecttemplates/MvcRelyingParty/Code/OpenIdRelyingPartyService.cs
+++ b/projecttemplates/MvcRelyingParty/Code/OpenIdRelyingPartyService.cs
@@ -24,7 +24,7 @@
IAuthenticationResponse GetResponse();
- IAuthenticationResponse GetResponse(HttpRequestInfo request);
+ IAuthenticationResponse GetResponse(HttpRequestBase request);
}
/// <summary>
@@ -101,7 +101,7 @@
return relyingParty.GetResponse();
}
- public IAuthenticationResponse GetResponse(HttpRequestInfo request) {
+ public IAuthenticationResponse GetResponse(HttpRequestBase request) {
return relyingParty.GetResponse(request);
}
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();
diff --git a/projecttemplates/MvcRelyingParty/OAuthTokenEndpoint.ashx.cs b/projecttemplates/MvcRelyingParty/OAuthTokenEndpoint.ashx.cs
index 4c741ae..2c655e0 100644
--- a/projecttemplates/MvcRelyingParty/OAuthTokenEndpoint.ashx.cs
+++ b/projecttemplates/MvcRelyingParty/OAuthTokenEndpoint.ashx.cs
@@ -41,7 +41,7 @@ namespace MvcRelyingParty {
public void ProcessRequest(HttpContext context) {
var serviceProvider = OAuthServiceProvider.AuthorizationServer;
IDirectResponseProtocolMessage response;
- if (serviceProvider.TryPrepareAccessTokenResponse(new HttpRequestInfo(context.Request), out response)) {
+ if (serviceProvider.TryPrepareAccessTokenResponse(new HttpRequestWrapper(context.Request), out response)) {
serviceProvider.Channel.Respond(response);
} else {
throw new InvalidOperationException();
diff --git a/projecttemplates/RelyingPartyLogic/OAuthAuthenticationModule.cs b/projecttemplates/RelyingPartyLogic/OAuthAuthenticationModule.cs
index 581b575..13e725d 100644
--- a/projecttemplates/RelyingPartyLogic/OAuthAuthenticationModule.cs
+++ b/projecttemplates/RelyingPartyLogic/OAuthAuthenticationModule.cs
@@ -54,7 +54,7 @@ namespace RelyingPartyLogic {
var resourceServer = new ResourceServer(tokenAnalyzer);
IPrincipal principal;
- var errorMessage = resourceServer.VerifyAccess(new HttpRequestInfo(this.application.Context.Request), out principal);
+ var errorMessage = resourceServer.VerifyAccess(new HttpRequestWrapper(this.application.Context.Request), out principal);
if (errorMessage == null) {
this.application.Context.User = principal;
}
diff --git a/projecttemplates/RelyingPartyLogic/RelyingPartyLogic.csproj b/projecttemplates/RelyingPartyLogic/RelyingPartyLogic.csproj
index 2880176..58e684e 100644
--- a/projecttemplates/RelyingPartyLogic/RelyingPartyLogic.csproj
+++ b/projecttemplates/RelyingPartyLogic/RelyingPartyLogic.csproj
@@ -85,6 +85,7 @@
<Reference Include="System.ServiceModel">
<RequiredTargetFramework>3.0</RequiredTargetFramework>
</Reference>
+ <Reference Include="System.Web.Abstractions" />
<Reference Include="System.Web.Entity">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
diff --git a/projecttemplates/WebFormsRelyingParty/OAuthTokenEndpoint.ashx.cs b/projecttemplates/WebFormsRelyingParty/OAuthTokenEndpoint.ashx.cs
index 3402bbe..fd68462 100644
--- a/projecttemplates/WebFormsRelyingParty/OAuthTokenEndpoint.ashx.cs
+++ b/projecttemplates/WebFormsRelyingParty/OAuthTokenEndpoint.ashx.cs
@@ -41,7 +41,7 @@ namespace WebFormsRelyingParty {
public void ProcessRequest(HttpContext context) {
var serviceProvider = OAuthServiceProvider.AuthorizationServer;
IDirectResponseProtocolMessage response;
- if (serviceProvider.TryPrepareAccessTokenResponse(new HttpRequestInfo(context.Request), out response)) {
+ if (serviceProvider.TryPrepareAccessTokenResponse(new HttpRequestWrapper(context.Request), out response)) {
serviceProvider.Channel.Respond(response);
} else {
throw new InvalidOperationException();
diff --git a/projecttemplates/WebFormsRelyingParty/WebFormsRelyingParty.csproj b/projecttemplates/WebFormsRelyingParty/WebFormsRelyingParty.csproj
index 81b2360..1f17837 100644
--- a/projecttemplates/WebFormsRelyingParty/WebFormsRelyingParty.csproj
+++ b/projecttemplates/WebFormsRelyingParty/WebFormsRelyingParty.csproj
@@ -63,6 +63,7 @@
<Reference Include="System.ServiceModel">
<RequiredTargetFramework>3.0</RequiredTargetFramework>
</Reference>
+ <Reference Include="System.Web.Abstractions" />
<Reference Include="System.Web.DynamicData" />
<Reference Include="System.Web.Entity">
<RequiredTargetFramework>3.5</RequiredTargetFramework>