Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

strategy:
matrix:
dotnet-version: ['net6.0', 'net7.0', 'net8.0']
dotnet-version: ['net6.0', 'net7.0', 'net8.0', 'net10.0']

steps:
- uses: actions/checkout@v5
Expand All @@ -24,6 +24,7 @@ jobs:
6.0.x
7.0.x
8.0.x
10.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/rl-secure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
6.0.x
7.0.x
8.0.x
10.0.x

- name: Create NuGet packages
shell: pwsh
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ A library based on `Microsoft.AspNetCore.Authentication.OpenIdConnect` to make i
## Getting started
### Requirements

This library supports .NET 6 and .NET 7.
This library supports .NET 6.0 and above.

### Installation

Expand Down
2 changes: 1 addition & 1 deletion docs-source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ A library based on `Microsoft.AspNetCore.Authentication.OpenIdConnect` to make i
## Getting started
### Requirements

This library supports .NET 6 and .NET 7.
This library supports .NET 6.0 and above.

### Installation

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>net6.0;net8.0;net10.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0;net10.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="6.0.*" Condition="'$(TargetFramework)' == 'net6.0'" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="7.0.*" Condition="'$(TargetFramework)' == 'net7.0'" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.*" Condition="'$(TargetFramework)' == 'net8.0'" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="10.0.*" Condition="'$(TargetFramework)' == 'net10.0'" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="8.14.0" />

<PackageReference Include="System.Text.Encodings.Web" Version="8.0.0" />
<PackageReference Include="System.Text.Encodings.Web" Version="10.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
{
try
{
context.Response.Headers.Add("Cache-Control", "no-cache, no-store");

Check warning on line 36 in src/Auth0.AspNetCore.Authentication/BackchannelLogout/BackchannelLogoutHandler.cs

View workflow job for this annotation

GitHub Actions / build (net10.0)

Use IHeaderDictionary.Append or the indexer to append or set headers. IDictionary.Add will throw an ArgumentException when attempting to add a duplicate key. (https://aka.ms/aspnet/analyzers)

Check warning on line 36 in src/Auth0.AspNetCore.Authentication/BackchannelLogout/BackchannelLogoutHandler.cs

View workflow job for this annotation

GitHub Actions / build (net8.0)

Use IHeaderDictionary.Append or the indexer to append or set headers. IDictionary.Add will throw an ArgumentException when attempting to add a duplicate key. (https://aka.ms/aspnet/analyzers)

if (context.Request.HasFormContentType)
{
Expand Down Expand Up @@ -111,7 +111,7 @@
}

var principal =
oidcOptions.SecurityTokenValidator.ValidateToken(token, tokenValidationParameters, out SecurityToken _);

Check warning on line 114 in src/Auth0.AspNetCore.Authentication/BackchannelLogout/BackchannelLogoutHandler.cs

View workflow job for this annotation

GitHub Actions / build (net10.0)

'OpenIdConnectOptions.SecurityTokenValidator' is obsolete: 'SecurityTokenValidator is no longer used by default. Use TokenHandler instead. To continue using SecurityTokenValidator, set UseSecurityTokenValidator to true. See https://aka.ms/aspnetcore8/security-token-changes'

Check warning on line 114 in src/Auth0.AspNetCore.Authentication/BackchannelLogout/BackchannelLogoutHandler.cs

View workflow job for this annotation

GitHub Actions / build (net10.0)

'OpenIdConnectOptions.SecurityTokenValidator' is obsolete: 'SecurityTokenValidator is no longer used by default. Use TokenHandler instead. To continue using SecurityTokenValidator, set UseSecurityTokenValidator to true. See https://aka.ms/aspnetcore8/security-token-changes'

Check warning on line 114 in src/Auth0.AspNetCore.Authentication/BackchannelLogout/BackchannelLogoutHandler.cs

View workflow job for this annotation

GitHub Actions / build (net8.0)

'OpenIdConnectOptions.SecurityTokenValidator' is obsolete: 'SecurityTokenValidator is no longer used by default. Use TokenHandler instead. To continue using SecurityTokenValidator, set UseSecurityTokenValidator to true. See https://aka.ms/aspnetcore8/security-token-changes'

LogoutTokenValidator.Validate(new JwtSecurityTokenHandler().ReadJwtToken(token));

Expand All @@ -124,7 +124,9 @@
public static async Task WriteErrorAsync(this HttpContext context, int statusCode, string error, string description)
{
context.Response.StatusCode = statusCode;
await context.Response.WriteAsJsonAsync(new { error, error_description = description });
context.Response.ContentType = "application/json";
var json = System.Text.Json.JsonSerializer.Serialize(new { error, error_description = description });
await context.Response.WriteAsync(json);
}

public static async Task WriteStatusCodeAsync(this HttpContext context, int statusCode)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<EmbeddedResource Include="jwks.json" />
<EmbeddedResource Include="jwks2.json" />
<EmbeddedResource Include="wellknownconfig.json" />
<EmbeddedResource Include="wellknownconfig_with_par.json" />
<EmbeddedResource Include="wellknownconfig_without_par.json" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public async Task Should_Throw_When_Using_PAR_But_No_OIDC_Config()
public async Task Should_Post_To_PAR_Endpoint()
{
var mockHandler = new OidcMockBuilder()
.MockOpenIdConfig()
.MockOpenIdConfig("wellknownconfig_with_par.json")
.MockJwks()
.MockPAR("https://my-par-request-uri")
.Build();
Expand Down Expand Up @@ -152,7 +152,7 @@ public async Task Should_Post_To_PAR_Endpoint()
public async Task Should_Handle_Errors_From_PAR_Endpoint()
{
var mockHandler = new OidcMockBuilder()
.MockOpenIdConfig()
.MockOpenIdConfig("wellknownconfig_with_par.json")
.MockJwks()
.MockPAR("https://my-par-request-uri", null, 70, HttpStatusCode.BadRequest)
.Build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"issuer": "https://tenant.eu.auth0.com/",
"authorization_endpoint": "https://tenant.eu.auth0.com/authorize",
"token_endpoint": "https://tenant.eu.auth0.com/oauth/token",
"pushed_authorization_request_endpoint": "https://tenant.eu.auth0.com/oauth/par",
"device_authorization_endpoint": "https://tenant.eu.auth0.com/oauth/device/code",
"userinfo_endpoint": "https://tenant.eu.auth0.com/userinfo",
"mfa_challenge_endpoint": "https://tenant.eu.auth0.com/mfa/challenge",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"issuer": "https://tenant.eu.auth0.com/",
"authorization_endpoint": "https://tenant.eu.auth0.com/authorize",
"token_endpoint": "https://tenant.eu.auth0.com/oauth/token",
"pushed_authorization_request_endpoint": "https://tenant.eu.auth0.com/oauth/par",
"device_authorization_endpoint": "https://tenant.eu.auth0.com/oauth/device/code",
"userinfo_endpoint": "https://tenant.eu.auth0.com/userinfo",
"mfa_challenge_endpoint": "https://tenant.eu.auth0.com/mfa/challenge",
"jwks_uri": "https://tenant.eu.auth0.com/.well-known/jwks.json",
"registration_endpoint": "https://tenant.eu.auth0.com/oidc/register",
"revocation_endpoint": "https://tenant.eu.auth0.com/oauth/revoke",
"scopes_supported": [
"openid",
"profile",
"offline_access",
"name",
"given_name",
"family_name",
"nickname",
"email",
"email_verified",
"picture",
"created_at",
"identities",
"phone",
"address"
],
"response_types_supported": [
"code",
"token",
"id_token",
"code token",
"code id_token",
"token id_token",
"code token id_token"
],
"code_challenge_methods_supported": [ "S256", "plain" ],
"response_modes_supported": [ "query", "fragment", "form_post" ],
"subject_types_supported": [ "public" ],
"id_token_signing_alg_values_supported": [ "HS256", "RS256" ],
"token_endpoint_auth_methods_supported": [
"client_secret_basic",
"client_secret_post"
],
"claims_supported": [
"aud",
"auth_time",
"created_at",
"email",
"email_verified",
"exp",
"family_name",
"given_name",
"iat",
"identities",
"iss",
"name",
"nickname",
"phone_number",
"picture",
"sub"
],
"request_uri_parameter_supported": false
}
Loading