Skip to content

Commit

Permalink
Remove Duende.Bff.Shared
Browse files Browse the repository at this point in the history
- Move the types in shared into Duende.Bff/Shared and make them `internal`
- Duende.Bff.Blazor.Client includes these types as linked files
- Add InternalsVisibileTo to Duende.Bff.Blazor in Duende.BFF so it can
  continue to use these shared types.
  • Loading branch information
damianh committed Oct 1, 2024
1 parent 064b890 commit 0f96dcc
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 45 deletions.
17 changes: 1 addition & 16 deletions 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
# Visual Studio Version 17
# 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,8 +63,6 @@ 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 @@ -339,18 +337,6 @@ 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 @@ -382,7 +368,6 @@ 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
12 changes: 8 additions & 4 deletions src/Duende.Bff.Blazor.Client/Duende.Bff.Blazor.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,23 @@
<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" />
<PackageReference Include="Microsoft.Extensions.Http" />
<!-- Explicitly taking this version so that we don't pull in vulnerable old versions. -->
<PackageReference Include="System.Text.Json" Version="8.0.4"/>

<ProjectReference Include="../Duende.Bff.Shared/Duende.Bff.Shared.csproj" />
<PackageReference Include="System.Text.Json" Version="8.0.4" />
</ItemGroup>

<ItemGroup>
<InternalsVisibleTo Include="Duende.Bff.Blazor.Client.UnitTests" />
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" />
</ItemGroup>

</Project>
10 changes: 0 additions & 10 deletions src/Duende.Bff.Shared/Duende.Bff.Shared.csproj

This file was deleted.

9 changes: 0 additions & 9 deletions src/Duende.Bff.Shared/README.md

This file was deleted.

5 changes: 3 additions & 2 deletions src/Duende.Bff/Duende.Bff.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@

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

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

<ProjectReference Include="../Duende.Bff.Shared/Duende.Bff.Shared.csproj" />
<ItemGroup>
<InternalsVisibleTo Include="Duende.Bff.Blazor" />
</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>
public class AuthenticationTicketLite
internal class AuthenticationTicketLite
{
/// <summary>
/// The scheme
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Duende.Bff;
/// <summary>
/// Serialization friendly claim
/// </summary>
public class ClaimLite
internal class ClaimLite
{
/// <summary>
/// The type
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// 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;

public static class ClaimsLiteExtensions
internal 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>
public class ClaimsPrincipalLite
internal class ClaimsPrincipalLite
{
/// <summary>
/// The authentication type
Expand Down

0 comments on commit 0f96dcc

Please sign in to comment.