summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.ApplicationBlock
diff options
context:
space:
mode:
Diffstat (limited to 'src/DotNetOpenAuth.ApplicationBlock')
-rw-r--r--src/DotNetOpenAuth.ApplicationBlock/DotNetOpenAuth.ApplicationBlock.csproj51
-rw-r--r--src/DotNetOpenAuth.ApplicationBlock/InMemoryClientAuthorizationTracker.cs2
-rw-r--r--src/DotNetOpenAuth.ApplicationBlock/InMemoryTokenManager.cs8
-rw-r--r--src/DotNetOpenAuth.ApplicationBlock/packages.config3
4 files changed, 42 insertions, 22 deletions
diff --git a/src/DotNetOpenAuth.ApplicationBlock/DotNetOpenAuth.ApplicationBlock.csproj b/src/DotNetOpenAuth.ApplicationBlock/DotNetOpenAuth.ApplicationBlock.csproj
index 243fa86..bc21448 100644
--- a/src/DotNetOpenAuth.ApplicationBlock/DotNetOpenAuth.ApplicationBlock.csproj
+++ b/src/DotNetOpenAuth.ApplicationBlock/DotNetOpenAuth.ApplicationBlock.csproj
@@ -79,9 +79,15 @@
<Reference Include="DotNetOpenAuth.OAuth">
<HintPath>..\..\packages\DotNetOpenAuth.OAuth.Core.4.0.0-RC1\lib\net40-full\DotNetOpenAuth.OAuth.dll</HintPath>
</Reference>
+ <Reference Include="DotNetOpenAuth.OAuth.Common">
+ <HintPath>..\..\packages\DotNetOpenAuth.OAuth.Common.4.0.0-RC1\lib\net40-full\DotNetOpenAuth.OAuth.Common.dll</HintPath>
+ </Reference>
<Reference Include="DotNetOpenAuth.OAuth.Consumer">
<HintPath>..\..\packages\DotNetOpenAuth.OAuth.Consumer.4.0.0-RC1\lib\net40-full\DotNetOpenAuth.OAuth.Consumer.dll</HintPath>
</Reference>
+ <Reference Include="DotNetOpenAuth.OAuth.ServiceProvider">
+ <HintPath>..\..\packages\DotNetOpenAuth.OAuth.ServiceProvider.4.0.0-RC1\lib\net40-full\DotNetOpenAuth.OAuth.ServiceProvider.dll</HintPath>
+ </Reference>
<Reference Include="DotNetOpenAuth.OAuth2">
<HintPath>..\..\packages\DotNetOpenAuth.OAuth2.Core.0.23.0-draft\lib\net40-full\DotNetOpenAuth.OAuth2.dll</HintPath>
</Reference>
@@ -100,6 +106,9 @@
<Reference Include="DotNetOpenAuth.OpenId.RelyingParty">
<HintPath>..\..\packages\DotNetOpenAuth.OpenId.RelyingParty.4.0.0-RC1\lib\net40-full\DotNetOpenAuth.OpenId.RelyingParty.dll</HintPath>
</Reference>
+ <Reference Include="DotNetOpenAuth.OpenIdOAuth">
+ <HintPath>..\..\packages\DotNetOpenAuth.OpenIdOAuth.4.0.0-RC1\lib\net40-full\DotNetOpenAuth.OpenIdOAuth.dll</HintPath>
+ </Reference>
<Reference Include="System" />
<Reference Include="System.configuration" />
<Reference Include="System.Core">
@@ -124,19 +133,37 @@
<Compile Include="Facebook\FacebookClient.cs" />
<Compile Include="Facebook\FacebookGraph.cs" />
<Compile Include="CustomExtensions\UIRequestAtRelyingPartyFactory.cs" />
- <Compile Include="GoogleConsumer.cs" />
- <Compile Include="InMemoryClientAuthorizationTracker.cs" />
+ <Compile Include="GoogleConsumer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="InMemoryClientAuthorizationTracker.cs">
+ <SubType>Code</SubType>
+ </Compile>
<Compile Include="InMemoryTokenManager.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="TokenManager.cs" />
- <Compile Include="TwitterConsumer.cs" />
- <Compile Include="Util.cs" />
- <Compile Include="WindowsLiveClient.cs" />
- <Compile Include="WindowsLiveGraph.cs" />
- <Compile Include="YammerConsumer.cs" />
- <Compile Include="YubikeyRelyingParty.cs" />
+ <Compile Include="TokenManager.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="TwitterConsumer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Util.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="WindowsLiveClient.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="WindowsLiveGraph.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="YammerConsumer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="YubikeyRelyingParty.cs">
+ <SubType>Code</SubType>
+ </Compile>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
@@ -156,12 +183,6 @@
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\..\src\DotNetOpenAuth.OpenIdOAuth\DotNetOpenAuth.OpenIdOAuth.csproj">
- <Project>{4BFAA336-5DF3-4F27-82D3-06D13240E8AB}</Project>
- <Name>DotNetOpenAuth.OpenIdOAuth</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
diff --git a/src/DotNetOpenAuth.ApplicationBlock/InMemoryClientAuthorizationTracker.cs b/src/DotNetOpenAuth.ApplicationBlock/InMemoryClientAuthorizationTracker.cs
index 9662cb2..0dad973 100644
--- a/src/DotNetOpenAuth.ApplicationBlock/InMemoryClientAuthorizationTracker.cs
+++ b/src/DotNetOpenAuth.ApplicationBlock/InMemoryClientAuthorizationTracker.cs
@@ -15,7 +15,6 @@ namespace DotNetOpenAuth.ApplicationBlock {
using DotNetOpenAuth.Messaging;
using DotNetOpenAuth.OAuth2;
-#if SAMPLESONLY
internal class InMemoryClientAuthorizationTracker : IClientAuthorizationTracker {
private readonly Dictionary<int, IAuthorizationState> savedStates = new Dictionary<int, IAuthorizationState>();
private int stateCounter;
@@ -47,5 +46,4 @@ namespace DotNetOpenAuth.ApplicationBlock {
return this.savedStates[counter] = new AuthorizationState(scope);
}
}
-#endif
}
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
diff --git a/src/DotNetOpenAuth.ApplicationBlock/packages.config b/src/DotNetOpenAuth.ApplicationBlock/packages.config
index 69ef031..4a552ac 100644
--- a/src/DotNetOpenAuth.ApplicationBlock/packages.config
+++ b/src/DotNetOpenAuth.ApplicationBlock/packages.config
@@ -3,12 +3,15 @@
<package id="CodeContracts.Unofficial" version="1.0.0.2" />
<package id="DotNetOpenAuth.Core" version="4.0.0-RC1" />
<package id="DotNetOpenAuth.InfoCard" version="4.0.0-RC1" />
+ <package id="DotNetOpenAuth.OAuth.Common" version="4.0.0-RC1" />
<package id="DotNetOpenAuth.OAuth.Consumer" version="4.0.0-RC1" />
<package id="DotNetOpenAuth.OAuth.Core" version="4.0.0-RC1" />
+ <package id="DotNetOpenAuth.OAuth.ServiceProvider" version="4.0.0-RC1" />
<package id="DotNetOpenAuth.OAuth2.Client" version="0.23.0-draft" />
<package id="DotNetOpenAuth.OAuth2.Client.UI" version="0.23.0-draft" />
<package id="DotNetOpenAuth.OAuth2.Core" version="0.23.0-draft" />
<package id="DotNetOpenAuth.OpenId.Core" version="4.0.0-RC1" />
<package id="DotNetOpenAuth.OpenId.Provider" version="4.0.0-RC1" />
<package id="DotNetOpenAuth.OpenId.RelyingParty" version="4.0.0-RC1" />
+ <package id="DotNetOpenAuth.OpenIdOAuth" version="4.0.0-RC1" />
</packages> \ No newline at end of file