diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2013-03-02 08:20:16 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2013-03-02 08:20:16 -0800 |
commit | ffecd2bd3cd8e0f21d4156770afe5d84626ca6bc (patch) | |
tree | 067d30f3de1c2bdc053d0ef5c47afd52a01b8f22 /samples/OAuthConsumerWpf/InMemoryTokenManager.cs | |
parent | d4d806fbcc1c7cdc86ec8234c5792bbaf667d5a8 (diff) | |
download | DotNetOpenAuth-ffecd2bd3cd8e0f21d4156770afe5d84626ca6bc.zip DotNetOpenAuth-ffecd2bd3cd8e0f21d4156770afe5d84626ca6bc.tar.gz DotNetOpenAuth-ffecd2bd3cd8e0f21d4156770afe5d84626ca6bc.tar.bz2 |
Fixes build breaks everywhere exception DNOA.AspNet.
Diffstat (limited to 'samples/OAuthConsumerWpf/InMemoryTokenManager.cs')
-rw-r--r-- | samples/OAuthConsumerWpf/InMemoryTokenManager.cs | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/samples/OAuthConsumerWpf/InMemoryTokenManager.cs b/samples/OAuthConsumerWpf/InMemoryTokenManager.cs deleted file mode 100644 index 5266404..0000000 --- a/samples/OAuthConsumerWpf/InMemoryTokenManager.cs +++ /dev/null @@ -1,58 +0,0 @@ -//----------------------------------------------------------------------- -// <copyright file="InMemoryTokenManager.cs" company="Outercurve Foundation"> -// Copyright (c) Outercurve Foundation. All rights reserved. -// </copyright> -//----------------------------------------------------------------------- - -namespace DotNetOpenAuth.Samples.OAuthConsumerWpf { - using System; - using System.Collections.Generic; - using System.Diagnostics; - using DotNetOpenAuth.OAuth.ChannelElements; - using DotNetOpenAuth.OAuth.Messages; - - internal class InMemoryTokenManager : IConsumerTokenManager { - private Dictionary<string, string> tokensAndSecrets = new Dictionary<string, string>(); - - internal InMemoryTokenManager() { - } - - public string ConsumerKey { get; internal set; } - - public string ConsumerSecret { get; internal set; } - - #region ITokenManager Members - - public string GetConsumerSecret(string consumerKey) { - if (consumerKey == this.ConsumerKey) { - return this.ConsumerSecret; - } else { - throw new ArgumentException("Unrecognized consumer key.", "consumerKey"); - } - } - - public string GetTokenSecret(string token) { - return this.tokensAndSecrets[token]; - } - - public void StoreNewRequestToken(UnauthorizedTokenRequest request, ITokenSecretContainingMessage response) { - this.tokensAndSecrets[response.Token] = response.TokenSecret; - } - - public void ExpireRequestTokenAndStoreNewAccessToken(string consumerKey, string requestToken, string accessToken, string accessTokenSecret) { - this.tokensAndSecrets.Remove(requestToken); - this.tokensAndSecrets[accessToken] = accessTokenSecret; - } - - /// <summary> - /// Classifies a token as a request token or an access token. - /// </summary> - /// <param name="token">The token to classify.</param> - /// <returns>Request or Access token, or invalid if the token is not recognized.</returns> - public TokenType GetTokenType(string token) { - throw new NotImplementedException(); - } - - #endregion - } -} |