summaryrefslogtreecommitdiffstats
path: root/samples/ServiceProvider/Members
diff options
context:
space:
mode:
Diffstat (limited to 'samples/ServiceProvider/Members')
-rw-r--r--samples/ServiceProvider/Members/Authorize.aspx.cs86
1 files changed, 43 insertions, 43 deletions
diff --git a/samples/ServiceProvider/Members/Authorize.aspx.cs b/samples/ServiceProvider/Members/Authorize.aspx.cs
index b78d8e1..64c9700 100644
--- a/samples/ServiceProvider/Members/Authorize.aspx.cs
+++ b/samples/ServiceProvider/Members/Authorize.aspx.cs
@@ -1,43 +1,43 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-using System.Web.UI;
-using System.Web.UI.WebControls;
-using DotNetOAuth;
-using DotNetOAuth.OAuth;
-using DotNetOAuth.OAuth.Messages;
-
-/// <summary>
-/// Conducts the user through a Consumer authorization process.
-/// </summary>
-public partial class Authorize : System.Web.UI.Page {
- protected void Page_Load(object sender, EventArgs e) {
- if (!IsPostBack) {
- if (Global.PendingOAuthAuthorization == null) {
- Response.Redirect("~/Members/AuthorizedConsumers.aspx");
- } else {
- ITokenContainingMessage pendingToken = Global.PendingOAuthAuthorization;
- var token = Global.DataContext.OAuthTokens.Single(t => t.Token == pendingToken.Token);
- desiredAccessLabel.Text = token.Scope;
- }
- }
- }
-
- protected void allowAccessButton_Click(object sender, EventArgs e) {
- var pending = Global.PendingOAuthAuthorization;
- Global.AuthorizePendingRequestToken();
- multiView.ActiveViewIndex = 1;
-
- ServiceProvider sp = new ServiceProvider(Constants.SelfDescription, Global.TokenManager);
- var response = sp.PrepareAuthorizationResponse(pending);
- if (response != null) {
- sp.Channel.Send(response).Send();
- }
- }
-
- protected void denyAccessButton_Click(object sender, EventArgs e) {
- // erase the request token.
- multiView.ActiveViewIndex = 2;
- }
-}
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using DotNetOpenAuth;
+using DotNetOpenAuth.OAuth;
+using DotNetOpenAuth.OAuth.Messages;
+
+/// <summary>
+/// Conducts the user through a Consumer authorization process.
+/// </summary>
+public partial class Authorize : System.Web.UI.Page {
+ protected void Page_Load(object sender, EventArgs e) {
+ if (!IsPostBack) {
+ if (Global.PendingOAuthAuthorization == null) {
+ Response.Redirect("~/Members/AuthorizedConsumers.aspx");
+ } else {
+ ITokenContainingMessage pendingToken = Global.PendingOAuthAuthorization;
+ var token = Global.DataContext.OAuthTokens.Single(t => t.Token == pendingToken.Token);
+ desiredAccessLabel.Text = token.Scope;
+ }
+ }
+ }
+
+ protected void allowAccessButton_Click(object sender, EventArgs e) {
+ var pending = Global.PendingOAuthAuthorization;
+ Global.AuthorizePendingRequestToken();
+ multiView.ActiveViewIndex = 1;
+
+ ServiceProvider sp = new ServiceProvider(Constants.SelfDescription, Global.TokenManager);
+ var response = sp.PrepareAuthorizationResponse(pending);
+ if (response != null) {
+ sp.Channel.Send(response).Send();
+ }
+ }
+
+ protected void denyAccessButton_Click(object sender, EventArgs e) {
+ // erase the request token.
+ multiView.ActiveViewIndex = 2;
+ }
+}