Skip to content

Commit

Permalink
Revert "Remove Duende.Bff.Shared"
Browse files Browse the repository at this point in the history
This reverts commit 0f96dcc.
  • Loading branch information
josephdecock committed Dec 17, 2024
1 parent 0908510 commit c8b34a1
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 16 deletions.
17 changes: 16 additions & 1 deletion Duende.Bff.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# 17
# Visual Studio Version 17
VisualStudioVersion = 17.9.34414.90
MinimumVisualStudioVersion = 15.0.26124.0
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Duende.Bff", "src\Duende.Bff\Duende.Bff.csproj", "{63FD9C99-C538-44BF-9AD4-D892775E336B}"
Expand Down Expand Up @@ -63,6 +63,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Duende.Bff.Blazor.Client.Un
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Duende.Bff.Blazor.UnitTests", "test\Duende.Bff.Blazor.UnitTests\Duende.Bff.Blazor.UnitTests.csproj", "{2A04808A-A06C-4F10-87B9-2D12E065F729}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Duende.Bff.Shared", "src\Duende.Bff.Shared\Duende.Bff.Shared.csproj", "{EDC31C09-611B-4B4A-870B-FE1BD9EF82AB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -337,6 +339,18 @@ Global
{2A04808A-A06C-4F10-87B9-2D12E065F729}.Release|x64.Build.0 = Release|Any CPU
{2A04808A-A06C-4F10-87B9-2D12E065F729}.Release|x86.ActiveCfg = Release|Any CPU
{2A04808A-A06C-4F10-87B9-2D12E065F729}.Release|x86.Build.0 = Release|Any CPU
{EDC31C09-611B-4B4A-870B-FE1BD9EF82AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EDC31C09-611B-4B4A-870B-FE1BD9EF82AB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EDC31C09-611B-4B4A-870B-FE1BD9EF82AB}.Debug|x64.ActiveCfg = Debug|Any CPU
{EDC31C09-611B-4B4A-870B-FE1BD9EF82AB}.Debug|x64.Build.0 = Debug|Any CPU
{EDC31C09-611B-4B4A-870B-FE1BD9EF82AB}.Debug|x86.ActiveCfg = Debug|Any CPU
{EDC31C09-611B-4B4A-870B-FE1BD9EF82AB}.Debug|x86.Build.0 = Debug|Any CPU
{EDC31C09-611B-4B4A-870B-FE1BD9EF82AB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EDC31C09-611B-4B4A-870B-FE1BD9EF82AB}.Release|Any CPU.Build.0 = Release|Any CPU
{EDC31C09-611B-4B4A-870B-FE1BD9EF82AB}.Release|x64.ActiveCfg = Release|Any CPU
{EDC31C09-611B-4B4A-870B-FE1BD9EF82AB}.Release|x64.Build.0 = Release|Any CPU
{EDC31C09-611B-4B4A-870B-FE1BD9EF82AB}.Release|x86.ActiveCfg = Release|Any CPU
{EDC31C09-611B-4B4A-870B-FE1BD9EF82AB}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -368,6 +382,7 @@ Global
{40EDC041-C262-414C-B374-631BF2D1BD97} = {8A0FCD30-A6D9-4622-B4D5-90010DE0795E}
{001840D4-8B83-4A8C-AF2C-5429D4F9A370} = {B2A776DB-385B-4AD4-96A5-61746FD909C3}
{2A04808A-A06C-4F10-87B9-2D12E065F729} = {B2A776DB-385B-4AD4-96A5-61746FD909C3}
{EDC31C09-611B-4B4A-870B-FE1BD9EF82AB} = {3C549079-A502-4B40-B051-5278915AE91B}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3DAD5980-4688-4794-9CF0-6F3CB67194E7}
Expand Down
8 changes: 1 addition & 7 deletions src/Duende.Bff.Blazor.Client/Duende.Bff.Blazor.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<Compile Include="..\Duende.Bff\Shared\ClaimLite.cs" Link="Shared\ClaimLite.cs" />
<Compile Include="..\Duende.Bff\Shared\ClaimsLiteExtensions.cs" Link="Shared\ClaimsLiteExtensions.cs" />
<Compile Include="..\Duende.Bff\Shared\ClaimsPrincipalLite.cs" Link="Shared\ClaimsPrincipalLite.cs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" />
Expand All @@ -24,5 +18,5 @@
<InternalsVisibleTo Include="Duende.Bff.Blazor.Client.UnitTests" />
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Duende.Bff;
/// <summary>
/// Serialization friendly claim
/// </summary>
internal class ClaimLite
public class ClaimLite
{
/// <summary>
/// The type
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
// Copyright (c) Duende Software. All rights reserved.
// See LICENSE in the project root for license information.

using System.Linq;
using System.Security.Claims;

namespace Duende.Bff;

internal static class ClaimsLiteExtensions
public static class ClaimsLiteExtensions
{
/// <summary>
/// Converts a ClaimsPrincipalLite to ClaimsPrincipal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Duende.Bff;
/// <summary>
/// Serialization friendly ClaimsPrincipal
/// </summary>
internal class ClaimsPrincipalLite
public class ClaimsPrincipalLite
{
/// <summary>
/// The authentication type
Expand Down
10 changes: 10 additions & 0 deletions src/Duende.Bff.Shared/Duende.Bff.Shared.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>Duende.Bff</RootNamespace>
</PropertyGroup>

</Project>
9 changes: 9 additions & 0 deletions src/Duende.Bff.Shared/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
This project contains code that needs to be shared across Duende.Bff and
Duende.Bff.Blazor.Client. We can't depend on Duende.Bff in
Duende.Bff.Blazor.Client because the Duende.Bff has a framework reference to
aspnetcore and Duende.Bff.Blazor.Client is intended to be consumed in blazor
wasm applications.

We can't depend on the Duende.Bff.Blazor.Client from Duende.Bff, because that
would bring all the blazor client work into the main package - we want that to
be opt in.
5 changes: 2 additions & 3 deletions src/Duende.Bff/Duende.Bff.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@

<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />

<PackageReference Include="Duende.AccessTokenManagement.OpenIdConnect" />
</ItemGroup>

<ItemGroup>
<InternalsVisibleTo Include="Duende.Bff.Blazor" />
<ProjectReference Include="../Duende.Bff.Shared/Duende.Bff.Shared.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public static string Serialize(this AuthenticationTicket ticket, IDataProtector
/// <summary>
/// Serialization friendly AuthenticationTicket
/// </summary>
internal class AuthenticationTicketLite
public class AuthenticationTicketLite
{
/// <summary>
/// The scheme
Expand Down

0 comments on commit c8b34a1

Please sign in to comment.