summaryrefslogtreecommitdiffstats
path: root/projecttemplates/WebFormsRelyingParty/Code/OAuthConsumerTokenManager.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-11-10 08:58:22 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2009-11-10 08:58:22 -0800
commit1fc942e7cefa847a919ae7c4ce424797c438a011 (patch)
tree6aaa7e8ca9f4aba504dd34b0efe70bfad364b162 /projecttemplates/WebFormsRelyingParty/Code/OAuthConsumerTokenManager.cs
parentcbc0964271849df85ba864944377d592d410de38 (diff)
downloadDotNetOpenAuth-1fc942e7cefa847a919ae7c4ce424797c438a011.zip
DotNetOpenAuth-1fc942e7cefa847a919ae7c4ce424797c438a011.tar.gz
DotNetOpenAuth-1fc942e7cefa847a919ae7c4ce424797c438a011.tar.bz2
Split up token manager into an SP side and a consumer side.
Diffstat (limited to 'projecttemplates/WebFormsRelyingParty/Code/OAuthConsumerTokenManager.cs')
-rw-r--r--projecttemplates/WebFormsRelyingParty/Code/OAuthConsumerTokenManager.cs48
1 files changed, 48 insertions, 0 deletions
diff --git a/projecttemplates/WebFormsRelyingParty/Code/OAuthConsumerTokenManager.cs b/projecttemplates/WebFormsRelyingParty/Code/OAuthConsumerTokenManager.cs
new file mode 100644
index 0000000..107934b
--- /dev/null
+++ b/projecttemplates/WebFormsRelyingParty/Code/OAuthConsumerTokenManager.cs
@@ -0,0 +1,48 @@
+//-----------------------------------------------------------------------
+// <copyright file="OAuthConsumerTokenManager.cs" company="Andrew Arnott">
+// Copyright (c) Andrew Arnott. All rights reserved.
+// </copyright>
+//-----------------------------------------------------------------------
+
+namespace WebFormsRelyingParty.Code {
+ using System;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Web;
+ using DotNetOpenAuth.OAuth.ChannelElements;
+
+ public class OAuthConsumerTokenManager : OAuthTokenManager, IConsumerTokenManager {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="OAuthConsumerTokenManager"/> class.
+ /// </summary>
+ /// <param name="consumerKey">The consumer key.</param>
+ /// <param name="consumerSecret">The consumer secret.</param>
+ public OAuthConsumerTokenManager(string consumerKey, string consumerSecret) {
+ if (String.IsNullOrEmpty(consumerKey)) {
+ throw new ArgumentNullException("consumerKey");
+ }
+ if (consumerSecret == null) {
+ throw new ArgumentNullException("consumerSecret");
+ }
+
+ this.ConsumerKey = consumerKey;
+ this.ConsumerSecret = consumerSecret;
+ }
+
+ #region IConsumerTokenManager Members
+
+ /// <summary>
+ /// Gets the consumer key.
+ /// </summary>
+ /// <value>The consumer key.</value>
+ public string ConsumerKey { get; private set; }
+
+ /// <summary>
+ /// Gets the consumer secret.
+ /// </summary>
+ /// <value>The consumer secret.</value>
+ public string ConsumerSecret { get; private set; }
+
+ #endregion
+ }
+}