Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

Commit b771a5a

Browse files
authored
Merge pull request #191 from askids/main
Add .Net 8 support
2 parents a8e6945 + 5fd4b80 commit b771a5a

15 files changed

+45
-52
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ jobs:
2525
uses: actions/setup-dotnet@v2
2626
with:
2727
dotnet-version: |
28-
6.0.x
29-
7.0.x
28+
8.0.x
29+
9.0.x
3030
3131
- run: dotnet --info
3232

@@ -39,4 +39,4 @@ jobs:
3939
SignClientSecret: ${{ secrets.SIGNCLIENTSECRET }}
4040
run: |
4141
./build.cmd sign
42-
dotnet nuget push .\artifacts\*.nupkg -s https://www.myget.org/F/identity/api/v2/package -k ${{ secrets.MYGET }}
42+
dotnet nuget push .\artifacts\*.nupkg -s https://www.myget.org/F/identity/api/v2/package -k ${{ secrets.MYGET }}

build/build.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net6.0</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
</PropertyGroup>
77

88
<ItemGroup>

src/Context/SendingRequestContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) Duende Software. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
33

4-
using IdentityModel.Client;
4+
using Duende.IdentityModel.Client;
55
using Microsoft.AspNetCore.Authentication;
66
using Microsoft.AspNetCore.Http;
77

src/Context/UpdateClientAssertionContext.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
33

44
using System;
5-
using IdentityModel.Client;
5+
using Duende.IdentityModel.Client;
66
using Microsoft.AspNetCore.Authentication;
77
using Microsoft.AspNetCore.Http;
88

@@ -32,4 +32,4 @@ public UpdateClientAssertionContext(
3232
/// </summary>
3333
public DateTime ClientAssertionExpirationTime { get; set; }
3434
}
35-
}
35+
}

src/IdentityModel.AspNetCore.OAuth2Introspection.csproj

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net6.0</TargetFramework>
3+
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
44

55
<PackageId>IdentityModel.AspNetCore.OAuth2Introspection</PackageId>
66
<Description>ASP.NET Core authentication handler for validating tokens using OAuth 2.0 introspection</Description>
@@ -27,9 +27,8 @@
2727
</ItemGroup>
2828

2929
<ItemGroup>
30-
<PackageReference Include="IdentityModel" Version="6.0.0" />
31-
32-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
33-
<PackageReference Include="minver" Version="4.3.0" PrivateAssets="All" />
30+
<PackageReference Include="Duende.IdentityModel" Version="7.1.0" />
31+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
32+
<PackageReference Include="minver" Version="6.0.0" PrivateAssets="All" />
3433
</ItemGroup>
3534
</Project>

src/Infrastructure/CacheExtensions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Duende Software. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
33

4+
using Duende.IdentityModel;
45
using Microsoft.Extensions.Caching.Distributed;
56
using Microsoft.Extensions.Logging;
67
using System;

src/OAuth2IntrospectionExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@ public static AuthenticationBuilder AddOAuth2Introspection(this AuthenticationBu
5656
return builder.AddScheme<OAuth2IntrospectionOptions, OAuth2IntrospectionHandler>(authenticationScheme, configureOptions);
5757
}
5858
}
59-
}
59+
}

src/OAuth2IntrospectionHandler.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
using System.Security.Claims;
99
using System.Text.Encodings.Web;
1010
using System.Threading.Tasks;
11-
using IdentityModel.Client;
11+
using Duende.IdentityModel.Client;
1212
using Microsoft.AspNetCore.Authentication;
1313
using Microsoft.AspNetCore.Http;
1414
using Microsoft.Extensions.Caching.Distributed;
@@ -33,22 +33,19 @@ public class OAuth2IntrospectionHandler : AuthenticationHandler<OAuth2Introspect
3333
/// </summary>
3434
/// <param name="options">The options.</param>
3535
/// <param name="urlEncoder">The URL encoder.</param>
36-
/// <param name="clock">The clock.</param>
3736
/// <param name="loggerFactory">The logger factory.</param>
3837
/// <param name="cache">The cache.</param>
3938
public OAuth2IntrospectionHandler(
4039
IOptionsMonitor<OAuth2IntrospectionOptions> options,
4140
UrlEncoder urlEncoder,
42-
ISystemClock clock,
4341
ILoggerFactory loggerFactory,
4442
IDistributedCache cache = null)
45-
: base(options, loggerFactory, urlEncoder, clock)
43+
: base(options, loggerFactory, urlEncoder)
4644
{
4745
_logger = loggerFactory.CreateLogger<OAuth2IntrospectionHandler>();
4846
_cache = cache;
4947
}
5048

51-
5249
/// <summary>
5350
/// The handler calls methods on the events which give the application control at certain points where processing is occurring.
5451
/// If it is not provided a default instance is supplied which does nothing when the methods are called.
@@ -272,4 +269,4 @@ private static async Task<AuthenticateResult> CreateTicket(
272269
return tokenValidatedContext.Result;
273270
}
274271
}
275-
}
272+
}

src/OAuth2IntrospectionOptions.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
33

44
using IdentityModel.AspNetCore.OAuth2Introspection.Infrastructure;
5-
using IdentityModel.Client;
5+
using Duende.IdentityModel;
6+
using Duende.IdentityModel.Client;
67
using Microsoft.AspNetCore.Authentication;
78
using Microsoft.AspNetCore.Http;
89
using System;

src/PostConfigureOAuth2IntrospectionOptions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System.Net.Http;
66
using System.Threading.Tasks;
77
using IdentityModel.AspNetCore.OAuth2Introspection.Infrastructure;
8-
using IdentityModel.Client;
8+
using Duende.IdentityModel.Client;
99
using Microsoft.Extensions.Caching.Distributed;
1010
using Microsoft.Extensions.Options;
1111

@@ -70,4 +70,4 @@ private async Task<string> GetIntrospectionEndpointFromDiscoveryDocument(OAuth2I
7070
return disco.IntrospectionEndpoint;
7171
}
7272
}
73-
}
73+
}

0 commit comments

Comments
 (0)