summaryrefslogtreecommitdiffstats
path: root/samples/ServiceProvider/OAuth.ashx
diff options
context:
space:
mode:
Diffstat (limited to 'samples/ServiceProvider/OAuth.ashx')
-rw-r--r--samples/ServiceProvider/OAuth.ashx9
1 files changed, 4 insertions, 5 deletions
diff --git a/samples/ServiceProvider/OAuth.ashx b/samples/ServiceProvider/OAuth.ashx
index f6694bc..55cd10c 100644
--- a/samples/ServiceProvider/OAuth.ashx
+++ b/samples/ServiceProvider/OAuth.ashx
@@ -1,6 +1,7 @@
<%@ WebHandler Language="C#" Class="OAuth" %>
using System;
+using System.Linq;
using System.Web;
using System.Web.SessionState;
using DotNetOAuth;
@@ -12,7 +13,7 @@ public class OAuth : IHttpHandler, IRequiresSessionState {
ServiceProvider sp;
public OAuth() {
- sp = new ServiceProvider(Constants.SelfDescription, Constants.TokenManager);
+ sp = new ServiceProvider(Constants.SelfDescription, Global.TokenManager);
}
public void ProcessRequest(HttpContext context) {
@@ -23,10 +24,8 @@ public class OAuth : IHttpHandler, IRequiresSessionState {
if ((requestToken = request as RequestTokenMessage) != null) {
sp.SendUnauthorizedTokenResponse(requestToken, null).Send();
} else if ((requestAuth = request as DirectUserToServiceProviderMessage) != null) {
- HttpContext.Current.Session["authrequest"] = requestAuth;
- //HttpContext.Current.Response.Redirect("~/authorize.aspx");
- Constants.TokenManager.AuthorizeRequestToken(requestAuth.RequestToken);
- sp.SendAuthorizationResponse(requestAuth).Send();
+ Global.PendingOAuthAuthorization = requestAuth;
+ HttpContext.Current.Response.Redirect("~/Members/Authorize.aspx");
} else if ((requestAccessToken = request as RequestAccessTokenMessage) != null) {
sp.SendAccessToken(requestAccessToken, null).Send();
} else {