diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2008-09-23 08:08:04 -0700 |
---|---|---|
committer | Andrew <andrewarnott@gmail.com> | 2008-09-23 08:08:04 -0700 |
commit | 22341a07b0ba0dc685bb859b0ed82c22fc3c09db (patch) | |
tree | 3a735cce2271b5b7b276bf5e4620348580726ba4 /src/DotNetOAuth/Consumer.cs | |
parent | 77adf75348090e79d3e93bff78a74c8688d8b58b (diff) | |
download | DotNetOpenAuth-22341a07b0ba0dc685bb859b0ed82c22fc3c09db.zip DotNetOpenAuth-22341a07b0ba0dc685bb859b0ed82c22fc3c09db.tar.gz DotNetOpenAuth-22341a07b0ba0dc685bb859b0ed82c22fc3c09db.tar.bz2 |
Implementing and refactoring ServiceProvider and Consumer classes.
Beginning to write a test for the spec's appendix A scenario.
Diffstat (limited to 'src/DotNetOAuth/Consumer.cs')
-rw-r--r-- | src/DotNetOAuth/Consumer.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/DotNetOAuth/Consumer.cs b/src/DotNetOAuth/Consumer.cs index 1a73d5f..a3af2bc 100644 --- a/src/DotNetOAuth/Consumer.cs +++ b/src/DotNetOAuth/Consumer.cs @@ -5,9 +5,39 @@ //-----------------------------------------------------------------------
namespace DotNetOAuth {
+ using DotNetOAuth.Messages;
+
/// <summary>
/// A website or application that uses OAuth to access the Service Provider on behalf of the User.
/// </summary>
internal class Consumer {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="Consumer"/> class.
+ /// </summary>
+ internal Consumer() {
+ }
+
+ /// <summary>
+ /// Gets or sets the Consumer Key used to communicate with the Service Provider.
+ /// </summary>
+ public string ConsumerKey { get; set; }
+
+ /// <summary>
+ /// Gets or sets the Consumer Secret used to communicate with the Service Provider.
+ /// </summary>
+ public string ConsumerSecret { get; set; }
+
+ /// <summary>
+ /// Gets or sets the Service Provider that will be accessed.
+ /// </summary>
+ public ServiceProvider ServiceProvider { get; set; }
+
+ /// <summary>
+ /// Begins an OAuth authorization request and redirects the user to the Service Provider
+ /// to provide that authorization.
+ /// </summary>
+ public void RequestUserAuthorization() {
+ RequestTokenMessage requestToken = new RequestTokenMessage(ServiceProvider.RequestTokenEndpoint);
+ }
}
}
|