diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2008-09-25 16:57:17 -0700 |
---|---|---|
committer | Andrew <andrewarnott@gmail.com> | 2008-09-25 16:57:17 -0700 |
commit | 50e34bfe7224576e901efa6748598d31c36df3a5 (patch) | |
tree | 4c9f820f54bb5578addbf064136f712dcf35c5c7 /src/DotNetOAuth/ChannelElements/ITokenManager.cs | |
parent | a9fb696c40441e06ef817d7e28bae74c6a6cb6e4 (diff) | |
download | DotNetOpenAuth-50e34bfe7224576e901efa6748598d31c36df3a5.zip DotNetOpenAuth-50e34bfe7224576e901efa6748598d31c36df3a5.tar.gz DotNetOpenAuth-50e34bfe7224576e901efa6748598d31c36df3a5.tar.bz2 |
Fixed lots of StyleCop issues and refacted Consumer/Service Provider a bit.
Diffstat (limited to 'src/DotNetOAuth/ChannelElements/ITokenManager.cs')
-rw-r--r-- | src/DotNetOAuth/ChannelElements/ITokenManager.cs | 42 |
1 files changed, 30 insertions, 12 deletions
diff --git a/src/DotNetOAuth/ChannelElements/ITokenManager.cs b/src/DotNetOAuth/ChannelElements/ITokenManager.cs index ee3124a..9aa9299 100644 --- a/src/DotNetOAuth/ChannelElements/ITokenManager.cs +++ b/src/DotNetOAuth/ChannelElements/ITokenManager.cs @@ -10,28 +10,46 @@ namespace DotNetOAuth.ChannelElements { using System.Linq;
using System.Text;
+ /// <summary>
+ /// An interface OAuth hosts must implement for persistent storage and recall of tokens and secrets.
+ /// </summary>
public interface ITokenManager {
+ /// <summary>
+ /// Gets the Consumer Secret given a Consumer Key.
+ /// </summary>
+ /// <param name="consumerKey">The Consumer Key.</param>
+ /// <returns>The Consumer Secret.</returns>
string GetConsumerSecret(string consumerKey);
+
+ /// <summary>
+ /// Gets the Token Secret given a request or access token.
+ /// </summary>
+ /// <param name="token">The request or access token.</param>
+ /// <returns>The secret associated with the given token.</returns>
string GetTokenSecret(string token);
/// <summary>
- ///
+ /// Stores a newly generated unauthorized request token, secret, and optional
+ /// application-specific parameters for later recall.
/// </summary>
- /// <param name="consumerKey"></param>
- /// <param name="requestToken"></param>
- /// <param name="requestTokenSecret"></param>
- /// <param name="parameters"></param>
- /// <returns>True if there was no conflict with an existing token. False if a new token should be generated.</returns>
+ /// <param name="consumerKey">The key of the Consumer that requested this token.</param>
+ /// <param name="requestToken">The token to store.</param>
+ /// <param name="requestTokenSecret">The secret to store as associated with the request token.</param>
+ /// <param name="parameters">The optional application-specific parameters of this request.</param>
void StoreNewRequestToken(string consumerKey, string requestToken, string requestTokenSecret, IDictionary<string, string> parameters);
/// <summary>
- ///
+ /// Deletes a request token and its associated secret and stores a new access token and secret.
/// </summary>
- /// <param name="consumerKey"></param>
- /// <param name="requestToken"></param>
- /// <param name="accessToken"></param>
- /// <param name="accessTokenSecret"></param>
- /// <returns>True if there was no conflict with an existing token. False if a new token should be generated.</returns>
+ /// <param name="consumerKey">The Consumer that is exchanging its request token for an access token.</param>
+ /// <param name="requestToken">The Consumer's request token that should be deleted/expired.</param>
+ /// <param name="accessToken">The new access token that is being issued to the Consumer.</param>
+ /// <param name="accessTokenSecret">The secret associated with the newly issued access token.</param>
+ /// <remarks>
+ /// Any scope of granted privileges associated with the request token from the
+ /// original call to <see cref="StoreNewRequestToken"/> should be carried over
+ /// to the new Access Token.
+ /// </remarks>
void ExpireRequestTokenAndStoreNewAccessToken(string consumerKey, string requestToken, string accessToken, string accessTokenSecret);
}
}
|