summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2010-02-24 08:15:26 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2010-02-24 08:15:26 -0800
commitba0570925584c3c0431e65f698c73f061f200a6f (patch)
treee18f8b0d9f4cca793133c83dbd14524e9f169a0e
parent8927e721ff4e57e26da620b3de531203b998ea42 (diff)
downloadDotNetOpenAuth-ba0570925584c3c0431e65f698c73f061f200a6f.zip
DotNetOpenAuth-ba0570925584c3c0431e65f698c73f061f200a6f.tar.gz
DotNetOpenAuth-ba0570925584c3c0431e65f698c73f061f200a6f.tar.bz2
Fixed build break introduced by last checkin.
-rw-r--r--samples/OpenIdRelyingPartyWebForms/Code/InMemoryTokenManager.cs73
-rw-r--r--samples/OpenIdRelyingPartyWebForms/OpenIdRelyingPartyWebForms.csproj1
2 files changed, 0 insertions, 74 deletions
diff --git a/samples/OpenIdRelyingPartyWebForms/Code/InMemoryTokenManager.cs b/samples/OpenIdRelyingPartyWebForms/Code/InMemoryTokenManager.cs
deleted file mode 100644
index 09a5b08..0000000
--- a/samples/OpenIdRelyingPartyWebForms/Code/InMemoryTokenManager.cs
+++ /dev/null
@@ -1,73 +0,0 @@
-//-----------------------------------------------------------------------
-// <copyright file="InMemoryTokenManager.cs" company="Andrew Arnott">
-// Copyright (c) Andrew Arnott. All rights reserved.
-// </copyright>
-//-----------------------------------------------------------------------
-
-namespace OpenIdRelyingPartyWebForms.Code {
- using System;
- using System.Collections.Generic;
- using System.Diagnostics;
- using DotNetOpenAuth.OAuth.ChannelElements;
- using DotNetOpenAuth.OAuth.Messages;
- using DotNetOpenAuth.OpenId.Extensions.OAuth;
-
- public class InMemoryTokenManager : IConsumerTokenManager, IOpenIdOAuthTokenManager {
- private Dictionary<string, string> tokensAndSecrets = new Dictionary<string, string>();
-
- public InMemoryTokenManager(string consumerKey, string consumerSecret) {
- if (String.IsNullOrEmpty(consumerKey)) {
- throw new ArgumentNullException("consumerKey");
- }
-
- this.ConsumerKey = consumerKey;
- this.ConsumerSecret = consumerSecret;
- }
-
- public string ConsumerKey { get; private set; }
-
- public string ConsumerSecret { get; private 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
-
- #region IOpenIdOAuthTokenManager Members
-
- public void StoreOpenIdAuthorizedRequestToken(string consumerKey, AuthorizationApprovedResponse authorization) {
- this.tokensAndSecrets[authorization.RequestToken] = string.Empty;
- }
-
- #endregion
- }
-} \ No newline at end of file
diff --git a/samples/OpenIdRelyingPartyWebForms/OpenIdRelyingPartyWebForms.csproj b/samples/OpenIdRelyingPartyWebForms/OpenIdRelyingPartyWebForms.csproj
index c8c2d2a..2515e07 100644
--- a/samples/OpenIdRelyingPartyWebForms/OpenIdRelyingPartyWebForms.csproj
+++ b/samples/OpenIdRelyingPartyWebForms/OpenIdRelyingPartyWebForms.csproj
@@ -100,7 +100,6 @@
<DesignTime>True</DesignTime>
<DependentUpon>CustomStoreDataSet.xsd</DependentUpon>
</Compile>
- <Compile Include="Code\InMemoryTokenManager.cs" />
<Compile Include="Code\State.cs" />
<Compile Include="Code\TracePageAppender.cs" />
<Compile Include="loginGoogleApps.aspx.cs">