Skip to content

Commit

Permalink
Merge pull request #31 from HenrikWM/f-split-into-client-server-nuget…
Browse files Browse the repository at this point in the history
…-package

Splits projects into Client, Server and a new shared library
  • Loading branch information
HenrikWM committed Nov 25, 2020
2 parents f30c332 + 69e66eb commit 7afe4cc
Show file tree
Hide file tree
Showing 25 changed files with 123 additions and 51 deletions.
18 changes: 16 additions & 2 deletions AnonymousTokens.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Server-side", "Server-side"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{4DDE2573-8947-4348-95B4-688102A8294D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AnonymousTokens", "src\AnonymousTokens\AnonymousTokens.csproj", "{D98EB88A-9922-4AA5-8C97-6206C7196CD5}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AnonymousTokens.Client", "src\AnonymousTokens.Client\AnonymousTokens.Client.csproj", "{D98EB88A-9922-4AA5-8C97-6206C7196CD5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Server.TokenGeneration.Api", "samples\ClientServer\Server\Server.TokenGeneration.Api\Server.TokenGeneration.Api.csproj", "{E691A98B-3EBC-4AE7-8858-67601E805909}"
EndProject
Expand All @@ -31,11 +31,15 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.github\workflows\CI.yml = .github\workflows\CI.yml
.github\workflows\codeql-analysis.yml = .github\workflows\codeql-analysis.yml
.github\dependabot.yml = .github\dependabot.yml
Directory.Build.props = Directory.Build.props
src\Directory.Build.props = src\Directory.Build.props
readme.md = readme.md
.github\workflows\Release.yml = .github\workflows\Release.yml
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AnonymousTokens.Server", "src\AnonymousTokens.Server\AnonymousTokens.Server.csproj", "{EF827382-7F6E-4230-A917-9D11415ECAD6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AnonymousTokens", "src\AnonymousTokens\AnonymousTokens.csproj", "{EAD6EEA6-8866-4D23-BCE0-891AEE53BE98}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -62,6 +66,14 @@ Global
{E24CF8EE-6D9B-49AC-92A5-EB1F81FDAAA2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E24CF8EE-6D9B-49AC-92A5-EB1F81FDAAA2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E24CF8EE-6D9B-49AC-92A5-EB1F81FDAAA2}.Release|Any CPU.Build.0 = Release|Any CPU
{EF827382-7F6E-4230-A917-9D11415ECAD6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EF827382-7F6E-4230-A917-9D11415ECAD6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EF827382-7F6E-4230-A917-9D11415ECAD6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EF827382-7F6E-4230-A917-9D11415ECAD6}.Release|Any CPU.Build.0 = Release|Any CPU
{EAD6EEA6-8866-4D23-BCE0-891AEE53BE98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EAD6EEA6-8866-4D23-BCE0-891AEE53BE98}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EAD6EEA6-8866-4D23-BCE0-891AEE53BE98}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EAD6EEA6-8866-4D23-BCE0-891AEE53BE98}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -75,6 +87,8 @@ Global
{A4143A14-789E-4AD0-BAD9-BF5B32E24EC7} = {FC4D5FE2-898D-4C67-8094-FDB6E71247CD}
{E24CF8EE-6D9B-49AC-92A5-EB1F81FDAAA2} = {4FB09123-E5E6-4367-BEDD-FF3D9906A2BA}
{017DB04E-CA83-4400-90FD-4CA10428EC51} = {645EAD64-C3E7-41AA-B7E4-E423DFFCEEDF}
{EF827382-7F6E-4230-A917-9D11415ECAD6} = {4DDE2573-8947-4348-95B4-688102A8294D}
{EAD6EEA6-8866-4D23-BCE0-891AEE53BE98} = {4DDE2573-8947-4348-95B4-688102A8294D}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {EC41792F-67C9-4BD6-B598-E3E2ECDD924C}
Expand Down
3 changes: 2 additions & 1 deletion Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ exec { & dotnet build -c Release }

exec { & dotnet test -c Release -r $artifacts --no-build -l trx --verbosity=normal }

exec { & dotnet pack .\src\AnonymousTokens\AnonymousTokens.csproj -c Release -o $artifacts --no-build }
exec { & dotnet pack .\src\AnonymousTokens.Client\AnonymousTokens.Client.csproj -c Release -o $artifacts --no-build }
exec { & dotnet pack .\src\AnonymousTokens.Server\AnonymousTokens.Server.csproj -c Release -o $artifacts --no-build }
7 changes: 0 additions & 7 deletions Directory.Build.props

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\src\AnonymousTokens.Client\AnonymousTokens.Client.csproj" />
<ProjectReference Include="..\..\..\..\src\AnonymousTokens\AnonymousTokens.csproj" />
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions samples/ClientServer/Client/Client.Console/Program.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

using AnonymousTokensConsole.ApiClients.TokenGeneration;

using AnonymousTokens.Protocol;
using AnonymousTokens.Services.InMemory;

using AnonymousTokensConsole.ApiClients.TokenGeneration;

using Client.Console.ApiClients.TokenVerification;

using Org.BouncyCastle.Asn1.X9;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using AnonymousTokens.Protocol;
using AnonymousTokens.Server.Protocol;
using AnonymousTokens.Services.InMemory;

using Microsoft.AspNetCore.Mvc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Portable.BouncyCastle" Version="1.8.8" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\src\AnonymousTokens\AnonymousTokens.csproj" />
<ProjectReference Include="..\..\..\..\src\AnonymousTokens.Server\AnonymousTokens.Server.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using AnonymousTokens.Protocol;

using AnonymousTokens.Server.Protocol;
using AnonymousTokens.Services;
using AnonymousTokens.Services.InMemory;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\src\AnonymousTokens\AnonymousTokens.csproj" />
<ProjectReference Include="..\..\..\..\src\AnonymousTokens.Server\AnonymousTokens.Server.csproj" />
</ItemGroup>

</Project>
21 changes: 21 additions & 0 deletions src/AnonymousTokens.Client/AnonymousTokens.Client.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Description>Anonymous tokens client-implementation in .NET based on Privacy Pass</Description>
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
<AssemblyName>AnonymousTokens.Client</AssemblyName>
<RootNamespace>AnonymousTokens.Client</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Portable.BouncyCastle" Version="1.8.8" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\AnonymousTokens\AnonymousTokens.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

using Org.BouncyCastle.Asn1.X9;
using Org.BouncyCastle.Crypto.Parameters;
using Org.BouncyCastle.Math;
Expand Down
26 changes: 26 additions & 0 deletions src/AnonymousTokens.Server/AnonymousTokens.Server.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Description>Anonymous tokens server-implementation in .NET based on Privacy Pass</Description>
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
<AssemblyName>AnonymousTokens.Server</AssemblyName>
<RootNamespace>AnonymousTokens.Server</RootNamespace>
</PropertyGroup>

<ItemGroup>
<Folder Include="Services\" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Portable.BouncyCastle" Version="1.8.8" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\AnonymousTokens\AnonymousTokens.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

using Org.BouncyCastle.Asn1.X9;
using Org.BouncyCastle.Crypto.Parameters;
using Org.BouncyCastle.Math;
Expand All @@ -7,7 +8,7 @@

using ECPoint = Org.BouncyCastle.Math.EC.ECPoint;

namespace AnonymousTokens.Protocol
namespace AnonymousTokens.Server.Protocol
{
public class TokenGenerator
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Org.BouncyCastle.Math;
using Org.BouncyCastle.Math.EC;

namespace AnonymousTokens.Protocol
namespace AnonymousTokens.Server.Protocol
{
public class TokenVerifier
{
Expand Down
29 changes: 8 additions & 21 deletions src/AnonymousTokens/AnonymousTokens.csproj
Original file line number Diff line number Diff line change
@@ -1,26 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Authors>Henrik Walker Moe, Tjerand Silde, Martin Strand</Authors>
<Description>Anonymous tokens implementation in .NET based on Privacy Pass</Description>
<Copyright>Copyright Henrik Walker Moe, Tjerand Silde, Martin Strand</Copyright>
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<Features>strict</Features>
<PackageTags>privacy-pass;anonymous-tokens</PackageTags>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<MinVerTagPrefix>v</MinVerTagPrefix>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<Deterministic>true</Deterministic>
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
<Version>0.1.0</Version>
<RepositoryUrl>https://github.com/HenrikWM/anonymous-tokens</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<AssemblyName>AnonymousTokens</AssemblyName>
<RootNamespace>AnonymousTokens</RootNamespace>
<IsPackable>false</IsPackable>
<PackageId>AnonymousTokens</PackageId>
<Product>AnonymousTokens</Product>
</PropertyGroup>

<ItemGroup>
Expand All @@ -34,10 +20,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Portable.BouncyCastle" Version="1.8.8" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
<PackageReference Include="Portable.BouncyCastle" Version="1.8.8" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


using Org.BouncyCastle.Math;

using System.Collections.Generic;
Expand All @@ -8,7 +8,7 @@

using ECPoint = Org.BouncyCastle.Math.EC.ECPoint;

namespace AnonymousTokens.Protocol
namespace AnonymousTokens
{
public static class CPChallengeGenerator
{
Expand Down
1 change: 1 addition & 0 deletions src/AnonymousTokens/ECCurveHash.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

using Org.BouncyCastle.Math;
using Org.BouncyCastle.Math.EC;

Expand Down
2 changes: 1 addition & 1 deletion src/AnonymousTokens/ECCurveRandomNumberGenerator.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Org.BouncyCastle.Math;
using Org.BouncyCastle.Math;
using Org.BouncyCastle.Math.EC;
using Org.BouncyCastle.Security;

Expand Down
2 changes: 1 addition & 1 deletion src/AnonymousTokens/Services/IPrivateKeyStore.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Org.BouncyCastle.Math;
using Org.BouncyCastle.Math;

namespace AnonymousTokens.Services
{
Expand Down
2 changes: 1 addition & 1 deletion src/AnonymousTokens/Services/IPublicKeyStore.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Org.BouncyCastle.Crypto.Parameters;
using Org.BouncyCastle.Crypto.Parameters;

namespace AnonymousTokens.Services
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


using System.IO;
using System.Reflection;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace AnonymousTokens.Services.InMemory
namespace AnonymousTokens.Services.InMemory
{
internal static class EmbeddedResourceConstants
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Org.BouncyCastle.Crypto.Parameters;
using Org.BouncyCastle.Crypto.Parameters;

namespace AnonymousTokens.Services.InMemory
{
Expand Down
1 change: 1 addition & 0 deletions src/AnonymousTokens/Services/InMemory/InMemorySeedStore.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

using Org.BouncyCastle.Utilities.Encoders;

using System.Collections.Generic;
Expand Down
28 changes: 28 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<Project>
<PropertyGroup>
<Authors>Henrik Walker Moe, Tjerand Silde, Martin Strand</Authors>
<Description>Anonymous tokens implementation in .NET based on Privacy Pass</Description>
<Copyright>Copyright Henrik Walker Moe, Tjerand Silde, Martin Strand</Copyright>
<LangVersion>latest</LangVersion>
<Features>strict</Features>
<Nullable>enable</Nullable>
<PackageTags>privacy-pass;anonymous-tokens</PackageTags>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<MinVerTagPrefix>v</MinVerTagPrefix>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<AnalysisLevel>latest</AnalysisLevel>
<IsPackable>True</IsPackable>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<Deterministic>true</Deterministic>
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
<Version>0.2.0</Version>
<RepositoryUrl>https://github.com/HenrikWM/anonymous-tokens</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<LangVersion>latest</LangVersion>
<NoWarn>$(NoWarn);CS1701;CS1702;CS1591;CS1570</NoWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
</Project>

0 comments on commit 7afe4cc

Please sign in to comment.