summaryrefslogtreecommitdiffstats
path: root/samples/OpenIdProviderWebForms/Provider.ashx.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2013-02-10 15:45:14 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2013-02-10 15:45:14 -0800
commit8d530aa91c05b14be12c5b1177f39eb5f62c669e (patch)
treee3da76a89c8d39ac61d36024ae298c4d931cf318 /samples/OpenIdProviderWebForms/Provider.ashx.cs
parent4e85bc002819c123a6e2dd88f18fcc82fa78c38f (diff)
downloadDotNetOpenAuth-8d530aa91c05b14be12c5b1177f39eb5f62c669e.zip
DotNetOpenAuth-8d530aa91c05b14be12c5b1177f39eb5f62c669e.tar.gz
DotNetOpenAuth-8d530aa91c05b14be12c5b1177f39eb5f62c669e.tar.bz2
Fixes up WCF OAuth 1 samples.
Diffstat (limited to 'samples/OpenIdProviderWebForms/Provider.ashx.cs')
-rw-r--r--samples/OpenIdProviderWebForms/Provider.ashx.cs20
1 files changed, 4 insertions, 16 deletions
diff --git a/samples/OpenIdProviderWebForms/Provider.ashx.cs b/samples/OpenIdProviderWebForms/Provider.ashx.cs
index 8022aae..d5d747b 100644
--- a/samples/OpenIdProviderWebForms/Provider.ashx.cs
+++ b/samples/OpenIdProviderWebForms/Provider.ashx.cs
@@ -4,9 +4,9 @@
using System.Threading.Tasks;
using System.Web;
using System.Web.SessionState;
+ using DotNetOpenAuth.ApplicationBlock;
using DotNetOpenAuth.Messaging;
using DotNetOpenAuth.OpenId.Provider;
-
using OpenIdProviderWebForms.Code;
/// <summary>
@@ -18,12 +18,12 @@
/// control to reduce the amount of source code in the web site. A typical Provider
/// site will have EITHER this .ashx handler OR the .aspx page -- NOT both.
/// </remarks>
- public class Provider : IHttpAsyncHandler, IRequiresSessionState {
- public bool IsReusable {
+ public class Provider : HttpAsyncHandlerBase, IRequiresSessionState {
+ public override bool IsReusable {
get { return true; }
}
- private async Task ProcessRequestAsync(HttpContext context) {
+ protected override async Task ProcessRequestAsync(HttpContext context) {
IRequest request = await ProviderEndpoint.Provider.GetRequestAsync(new HttpRequestWrapper(context.Request), context.Response.ClientDisconnectedToken);
if (request != null) {
// Some OpenID requests are automatable and can be responded to immediately.
@@ -66,17 +66,5 @@
}
}
}
-
- public IAsyncResult BeginProcessRequest(HttpContext context, System.AsyncCallback cb, object extraData) {
- return this.ProcessRequestAsync(context).ToApm(cb, extraData);
- }
-
- public void EndProcessRequest(IAsyncResult result) {
- ((Task)result).Wait(); // rethrows exceptions
- }
-
- public void ProcessRequest(HttpContext context) {
- this.ProcessRequestAsync(context).GetAwaiter().GetResult();
- }
}
}