diff options
Diffstat (limited to 'src/DotNetOpenAuth.ApplicationBlock/InMemoryTokenManager.cs')
-rw-r--r-- | src/DotNetOpenAuth.ApplicationBlock/InMemoryTokenManager.cs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/DotNetOpenAuth.ApplicationBlock/InMemoryTokenManager.cs b/src/DotNetOpenAuth.ApplicationBlock/InMemoryTokenManager.cs index 35f6c08..2a1e155 100644 --- a/src/DotNetOpenAuth.ApplicationBlock/InMemoryTokenManager.cs +++ b/src/DotNetOpenAuth.ApplicationBlock/InMemoryTokenManager.cs @@ -8,11 +8,12 @@ namespace DotNetOpenAuth.ApplicationBlock { using System; using System.Collections.Generic; using System.Diagnostics; + + using DotNetOpenAuth.OAuth; using DotNetOpenAuth.OAuth.ChannelElements; using DotNetOpenAuth.OAuth.Messages; using DotNetOpenAuth.OpenId.Extensions.OAuth; -#if SAMPLESONLY /// <summary> /// A token manager that only retains tokens in memory. /// Meant for SHORT TERM USE TOKENS ONLY. @@ -22,7 +23,7 @@ namespace DotNetOpenAuth.ApplicationBlock { /// where the user only signs in without providing any authorization to access /// Twitter APIs except to authenticate, since that access token is only useful once. /// </remarks> - internal class InMemoryTokenManager : IConsumerTokenManager, IOpenIdOAuthTokenManager { + public class InMemoryTokenManager : IConsumerTokenManager, IOpenIdOAuthTokenManager { private Dictionary<string, string> tokensAndSecrets = new Dictionary<string, string>(); /// <summary> @@ -141,7 +142,4 @@ namespace DotNetOpenAuth.ApplicationBlock { #endregion } -#else -#error The InMemoryTokenManager class is only for samples as it forgets all tokens whenever the application restarts! You should implement IConsumerTokenManager in your own app that stores tokens in a persistent store (like a SQL database). -#endif }
\ No newline at end of file |