summaryrefslogtreecommitdiffstats
path: root/samples/OAuthServiceProvider
diff options
context:
space:
mode:
Diffstat (limited to 'samples/OAuthServiceProvider')
-rw-r--r--samples/OAuthServiceProvider/Code/DatabaseNonceStore.cs3
-rw-r--r--samples/OAuthServiceProvider/OAuth2.ashx.cs5
2 files changed, 3 insertions, 5 deletions
diff --git a/samples/OAuthServiceProvider/Code/DatabaseNonceStore.cs b/samples/OAuthServiceProvider/Code/DatabaseNonceStore.cs
index 1f8f56e..f0c10d1 100644
--- a/samples/OAuthServiceProvider/Code/DatabaseNonceStore.cs
+++ b/samples/OAuthServiceProvider/Code/DatabaseNonceStore.cs
@@ -4,6 +4,7 @@
using System.Linq;
using System.Web;
using DotNetOpenAuth.Messaging.Bindings;
+ using System.Data.SqlClient;
/// <summary>
/// A database-persisted nonce store.
@@ -47,6 +48,8 @@
return true;
} catch (System.Data.Linq.DuplicateKeyException) {
return false;
+ } catch (SqlException) {
+ return false;
}
}
diff --git a/samples/OAuthServiceProvider/OAuth2.ashx.cs b/samples/OAuthServiceProvider/OAuth2.ashx.cs
index 259803a..62aa680 100644
--- a/samples/OAuthServiceProvider/OAuth2.ashx.cs
+++ b/samples/OAuthServiceProvider/OAuth2.ashx.cs
@@ -38,11 +38,6 @@
throw new HttpException((int)HttpStatusCode.BadRequest, "Missing authorization request.");
}
- // This sample doesn't implement support for immediate mode.
- if (!request.IsUserInteractionAllowed) {
- Global.AuthorizationServer.RejectAuthorizationRequest(request);
- }
-
// Redirect the user to a page that requires the user to be logged in.
Global.PendingOAuth2Authorization = request;
context.Response.Redirect("~/Members/Authorize2.aspx");