diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2008-10-07 21:36:29 -0700 |
---|---|---|
committer | Andrew <andrewarnott@gmail.com> | 2008-10-07 21:36:29 -0700 |
commit | 29d897769f3e7a9568fa668836807d9a31b5fabc (patch) | |
tree | fb9a91e0804ed5a92d183268309ea0234732682b /samples/Consumer/App_Code/InMemoryTokenManager.cs | |
parent | 43188751fe5c64c8f29f62e448a2c6a798910328 (diff) | |
download | DotNetOpenAuth-29d897769f3e7a9568fa668836807d9a31b5fabc.zip DotNetOpenAuth-29d897769f3e7a9568fa668836807d9a31b5fabc.tar.gz DotNetOpenAuth-29d897769f3e7a9568fa668836807d9a31b5fabc.tar.bz2 |
Added strong-typed request token message to sample.
This proves that messages can be derived from and tailored to provide type-safe additions where the OAuth protocol permits it.
As can be seen, several more types and members had to be made public for this to work.
Diffstat (limited to 'samples/Consumer/App_Code/InMemoryTokenManager.cs')
-rw-r--r-- | samples/Consumer/App_Code/InMemoryTokenManager.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/samples/Consumer/App_Code/InMemoryTokenManager.cs b/samples/Consumer/App_Code/InMemoryTokenManager.cs index 83c45bd..edd3a9d 100644 --- a/samples/Consumer/App_Code/InMemoryTokenManager.cs +++ b/samples/Consumer/App_Code/InMemoryTokenManager.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic;
using System.Diagnostics;
using DotNetOAuth.ChannelElements;
+using DotNetOAuth.Messages;
public class InMemoryTokenManager : ITokenManager {
private Dictionary<string, string> tokensAndSecrets = new Dictionary<string, string>();
@@ -35,8 +36,8 @@ public class InMemoryTokenManager : ITokenManager { return this.tokensAndSecrets[token];
}
- public void StoreNewRequestToken(string consumerKey, string requestToken, string requestTokenSecret, IDictionary<string, string> requestParameters, IDictionary<string, string> responseParameters) {
- this.tokensAndSecrets[requestToken] = requestTokenSecret;
+ public void StoreNewRequestToken(RequestTokenMessage request, UnauthorizedRequestTokenMessage response) {
+ this.tokensAndSecrets[response.RequestToken] = response.TokenSecret;
}
/// <summary>
|