Skip to content

Commit 5b799be

Browse files
authored
Adds support for net10.0 (#195)
2 parents 5f73c46 + b018b6b commit 5b799be

11 files changed

Lines changed: 83 additions & 12 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
strategy:
1515
matrix:
16-
dotnet-version: ['net6.0', 'net7.0', 'net8.0']
16+
dotnet-version: ['net6.0', 'net7.0', 'net8.0', 'net10.0']
1717

1818
steps:
1919
- uses: actions/checkout@v5
@@ -24,6 +24,7 @@ jobs:
2424
6.0.x
2525
7.0.x
2626
8.0.x
27+
10.0.x
2728
- name: Restore dependencies
2829
run: dotnet restore
2930
- name: Build

.github/workflows/rl-secure.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ jobs:
4545
6.0.x
4646
7.0.x
4747
8.0.x
48+
10.0.x
4849
4950
- name: Create NuGet packages
5051
shell: pwsh

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ A library based on `Microsoft.AspNetCore.Authentication.OpenIdConnect` to make i
2020
## Getting started
2121
### Requirements
2222

23-
This library supports .NET 6 and .NET 7.
23+
This library supports .NET 6.0 and above.
2424

2525
### Installation
2626

docs-source/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ A library based on `Microsoft.AspNetCore.Authentication.OpenIdConnect` to make i
1919
## Getting started
2020
### Requirements
2121

22-
This library supports .NET 6 and .NET 7.
22+
This library supports .NET 6.0 and above.
2323

2424
### Installation
2525

playground/Auth0.AspNetCore.Authentication.Playground/Auth0.AspNetCore.Authentication.Playground.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
4+
<TargetFrameworks>net6.0;net8.0;net10.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<ItemGroup>

src/Auth0.AspNetCore.Authentication/Auth0.AspNetCore.Authentication.csproj

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
4+
<TargetFrameworks>net6.0;net7.0;net8.0;net10.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<ItemGroup>
88
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="6.0.*" Condition="'$(TargetFramework)' == 'net6.0'" />
99
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="7.0.*" Condition="'$(TargetFramework)' == 'net7.0'" />
1010
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.*" Condition="'$(TargetFramework)' == 'net8.0'" />
11+
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="10.0.*" Condition="'$(TargetFramework)' == 'net10.0'" />
12+
</ItemGroup>
13+
14+
<ItemGroup>
1115
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="8.14.0" />
12-
13-
<PackageReference Include="System.Text.Encodings.Web" Version="8.0.0" />
16+
<PackageReference Include="System.Text.Encodings.Web" Version="10.0.0" />
1417
</ItemGroup>
1518

1619
<ItemGroup>

src/Auth0.AspNetCore.Authentication/BackchannelLogout/BackchannelLogoutHandler.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@ public static class HttpContextExtensions
124124
public static async Task WriteErrorAsync(this HttpContext context, int statusCode, string error, string description)
125125
{
126126
context.Response.StatusCode = statusCode;
127-
await context.Response.WriteAsJsonAsync(new { error, error_description = description });
127+
context.Response.ContentType = "application/json";
128+
var json = System.Text.Json.JsonSerializer.Serialize(new { error, error_description = description });
129+
await context.Response.WriteAsync(json);
128130
}
129131

130132
public static async Task WriteStatusCodeAsync(this HttpContext context, int statusCode)

tests/Auth0.AspNetCore.Authentication.IntegrationTests/Auth0.AspNetCore.Authentication.IntegrationTests.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
</PropertyGroup>
66

77
<ItemGroup>
88
<EmbeddedResource Include="jwks.json" />
99
<EmbeddedResource Include="jwks2.json" />
1010
<EmbeddedResource Include="wellknownconfig.json" />
11+
<EmbeddedResource Include="wellknownconfig_with_par.json" />
1112
<EmbeddedResource Include="wellknownconfig_without_par.json" />
1213
</ItemGroup>
1314

tests/Auth0.AspNetCore.Authentication.IntegrationTests/Auth0MiddlewareTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public async Task Should_Throw_When_Using_PAR_But_No_OIDC_Config()
124124
public async Task Should_Post_To_PAR_Endpoint()
125125
{
126126
var mockHandler = new OidcMockBuilder()
127-
.MockOpenIdConfig()
127+
.MockOpenIdConfig("wellknownconfig_with_par.json")
128128
.MockJwks()
129129
.MockPAR("https://my-par-request-uri")
130130
.Build();
@@ -152,7 +152,7 @@ public async Task Should_Post_To_PAR_Endpoint()
152152
public async Task Should_Handle_Errors_From_PAR_Endpoint()
153153
{
154154
var mockHandler = new OidcMockBuilder()
155-
.MockOpenIdConfig()
155+
.MockOpenIdConfig("wellknownconfig_with_par.json")
156156
.MockJwks()
157157
.MockPAR("https://my-par-request-uri", null, 70, HttpStatusCode.BadRequest)
158158
.Build();

tests/Auth0.AspNetCore.Authentication.IntegrationTests/wellknownconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"issuer": "https://tenant.eu.auth0.com/",
33
"authorization_endpoint": "https://tenant.eu.auth0.com/authorize",
44
"token_endpoint": "https://tenant.eu.auth0.com/oauth/token",
5-
"pushed_authorization_request_endpoint": "https://tenant.eu.auth0.com/oauth/par",
65
"device_authorization_endpoint": "https://tenant.eu.auth0.com/oauth/device/code",
76
"userinfo_endpoint": "https://tenant.eu.auth0.com/userinfo",
87
"mfa_challenge_endpoint": "https://tenant.eu.auth0.com/mfa/challenge",

0 commit comments

Comments
 (0)