summaryrefslogtreecommitdiffstats
path: root/samples/ConsumerWpf/InMemoryTokenManager.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2008-10-07 21:36:29 -0700
committerAndrew <andrewarnott@gmail.com>2008-10-07 21:36:29 -0700
commit29d897769f3e7a9568fa668836807d9a31b5fabc (patch)
treefb9a91e0804ed5a92d183268309ea0234732682b /samples/ConsumerWpf/InMemoryTokenManager.cs
parent43188751fe5c64c8f29f62e448a2c6a798910328 (diff)
downloadDotNetOpenAuth-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/ConsumerWpf/InMemoryTokenManager.cs')
-rw-r--r--samples/ConsumerWpf/InMemoryTokenManager.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/samples/ConsumerWpf/InMemoryTokenManager.cs b/samples/ConsumerWpf/InMemoryTokenManager.cs
index 439f1a2..45ae0b2 100644
--- a/samples/ConsumerWpf/InMemoryTokenManager.cs
+++ b/samples/ConsumerWpf/InMemoryTokenManager.cs
@@ -9,6 +9,7 @@ namespace DotNetOAuth.Samples.ConsumerWpf {
using System.Collections.Generic;
using System.Diagnostics;
using DotNetOAuth.ChannelElements;
+ using DotNetOAuth.Messages;
internal class InMemoryTokenManager : ITokenManager {
private Dictionary<string, string> tokensAndSecrets = new Dictionary<string, string>();
@@ -34,8 +35,8 @@ namespace DotNetOAuth.Samples.ConsumerWpf {
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>