Skip to content

Commit 2cb59bc

Browse files
committed
remove AspNetCore.SecurityKey.OpenApi due to naming conflict
1 parent cba9f8a commit 2cb59bc

File tree

9 files changed

+10
-64
lines changed

9 files changed

+10
-64
lines changed

AspNetCore.SecurityKey.sln

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.Middleware", "sample
3232
EndProject
3333
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.Shared", "samples\Sample.Shared\Sample.Shared.csproj", "{CF5ED041-2229-4481-8DCC-8BB4438B222C}"
3434
EndProject
35-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AspNetCore.SecurityKey.OpenApi", "src\AspNetCore.SecurityKey.OpenApi\AspNetCore.SecurityKey.OpenApi.csproj", "{D85383E1-69CE-4CC0-B65A-171E0B31F336}"
36-
EndProject
3735
Global
3836
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3937
Debug|Any CPU = Debug|Any CPU
@@ -64,10 +62,6 @@ Global
6462
{CF5ED041-2229-4481-8DCC-8BB4438B222C}.Debug|Any CPU.Build.0 = Debug|Any CPU
6563
{CF5ED041-2229-4481-8DCC-8BB4438B222C}.Release|Any CPU.ActiveCfg = Release|Any CPU
6664
{CF5ED041-2229-4481-8DCC-8BB4438B222C}.Release|Any CPU.Build.0 = Release|Any CPU
67-
{D85383E1-69CE-4CC0-B65A-171E0B31F336}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
68-
{D85383E1-69CE-4CC0-B65A-171E0B31F336}.Debug|Any CPU.Build.0 = Debug|Any CPU
69-
{D85383E1-69CE-4CC0-B65A-171E0B31F336}.Release|Any CPU.ActiveCfg = Release|Any CPU
70-
{D85383E1-69CE-4CC0-B65A-171E0B31F336}.Release|Any CPU.Build.0 = Release|Any CPU
7165
EndGlobalSection
7266
GlobalSection(SolutionProperties) = preSolution
7367
HideSolutionNode = FALSE

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,7 @@ builder.Services.AddSecurityKey<CustomSecurityKeyValidator, CustomSecurityKeyExt
225225

226226
### Open API
227227

228-
NuGet Package: `AspNetCore.SecurityKey.OpenApi`
229-
230-
Add Open API support
228+
Add Open API support in .NET 9+
231229

232230
```c#
233231
var builder = WebApplication.CreateBuilder(args);

samples/Sample.MinimalApi/Program.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System.Security.Claims;
22

33
using AspNetCore.SecurityKey;
4-
using AspNetCore.SecurityKey.OpenApi;
54

65
using Sample.Shared;
76

samples/Sample.MinimalApi/Sample.MinimalApi.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
</ItemGroup>
1414

1515
<ItemGroup>
16-
<ProjectReference Include="..\..\src\AspNetCore.SecurityKey.OpenApi\AspNetCore.SecurityKey.OpenApi.csproj" />
1716
<ProjectReference Include="..\..\src\AspNetCore.SecurityKey\AspNetCore.SecurityKey.csproj" />
1817
<ProjectReference Include="..\Sample.Shared\Sample.Shared.csproj" />
1918
</ItemGroup>

src/AspNetCore.Extensions.Diagnostics/AspNetCore.Extensions.Diagnostics.csproj

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/AspNetCore.Extensions.Diagnostics/EndpointRouteBuilderExtensions.cs

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/AspNetCore.SecurityKey.OpenApi/AspNetCore.SecurityKey.OpenApi.csproj

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/AspNetCore.SecurityKey/AspNetCore.SecurityKey.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFrameworks>net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
@@ -10,4 +10,8 @@
1010
<FrameworkReference Include="Microsoft.AspNetCore.App" />
1111
</ItemGroup>
1212

13+
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
14+
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.4"/>
15+
</ItemGroup>
16+
1317
</Project>

src/AspNetCore.SecurityKey.OpenApi/SecurityKeyDocumentTransformer.cs renamed to src/AspNetCore.SecurityKey/SecurityKeyDocumentTransformer.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
#if NET9_0_OR_GREATER
2+
13
using Microsoft.AspNetCore.Authentication;
24
using Microsoft.AspNetCore.OpenApi;
35
using Microsoft.Extensions.Options;
46
using Microsoft.OpenApi.Models;
57

6-
namespace AspNetCore.SecurityKey.OpenApi;
8+
namespace AspNetCore.SecurityKey;
79

810
/// <summary>
911
/// A transformer that modifies the OpenAPI document to include security key authentication schemes.
@@ -62,3 +64,4 @@ public async Task TransformAsync(OpenApiDocument document, OpenApiDocumentTransf
6264
}
6365
}
6466
}
67+
#endif

0 commit comments

Comments
 (0)