Skip to content

Commit 93dd3b8

Browse files
committed
Updated dependencies
- Drop support for dotnet 6,7 - Reference Duende.IdentityModel
1 parent 9067ce4 commit 93dd3b8

14 files changed

+23
-54
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ jobs:
2525
uses: actions/setup-dotnet@v2
2626
with:
2727
dotnet-version: |
28-
6.0.x
29-
7.0.x
3028
8.0.x
3129
3230
- run: dotnet --info
@@ -40,4 +38,4 @@ jobs:
4038
SignClientSecret: ${{ secrets.SIGNCLIENTSECRET }}
4139
run: |
4240
./build.cmd sign
43-
dotnet nuget push .\artifacts\*.nupkg -s https://www.myget.org/F/identity/api/v2/package -k ${{ secrets.MYGET }}
41+
dotnet nuget push .\artifacts\*.nupkg -s https://www.myget.org/F/identity/api/v2/package -k ${{ secrets.MYGET }}

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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
3+
<TargetFrameworks>net8.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,8 +27,8 @@
2727
</ItemGroup>
2828

2929
<ItemGroup>
30-
<PackageReference Include="IdentityModel" Version="7.0.0" />
30+
<PackageReference Include="Duende.IdentityModel" Version="7.1.0" />
3131
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
32-
<PackageReference Include="minver" Version="5.0.0" PrivateAssets="All" />
32+
<PackageReference Include="minver" Version="6.0.0" PrivateAssets="All" />
3333
</ItemGroup>
3434
</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: 2 additions & 25 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;
@@ -28,27 +28,6 @@ public class OAuth2IntrospectionHandler : AuthenticationHandler<OAuth2Introspect
2828
private static readonly ConcurrentDictionary<string, Lazy<Task<TokenIntrospectionResponse>>> IntrospectionDictionary =
2929
new ConcurrentDictionary<string, Lazy<Task<TokenIntrospectionResponse>>>();
3030

31-
#if NET6_0
32-
/// <summary>
33-
/// Initializes a new instance of the <see cref="OAuth2IntrospectionHandler"/> class.
34-
/// </summary>
35-
/// <param name="options">The options.</param>
36-
/// <param name="urlEncoder">The URL encoder.</param>
37-
/// <param name="clock">The clock.</param>
38-
/// <param name="loggerFactory">The logger factory.</param>
39-
/// <param name="cache">The cache.</param>
40-
public OAuth2IntrospectionHandler(
41-
IOptionsMonitor<OAuth2IntrospectionOptions> options,
42-
UrlEncoder urlEncoder,
43-
ISystemClock clock,
44-
ILoggerFactory loggerFactory,
45-
IDistributedCache cache = null)
46-
: base(options, loggerFactory, urlEncoder, clock)
47-
{
48-
_logger = loggerFactory.CreateLogger<OAuth2IntrospectionHandler>();
49-
_cache = cache;
50-
}
51-
#elif NET8_0_OR_GREATER
5231
/// <summary>
5332
/// Initializes a new instance of the <see cref="OAuth2IntrospectionHandler"/> class.
5433
/// </summary>
@@ -66,8 +45,6 @@ public OAuth2IntrospectionHandler(
6645
_logger = loggerFactory.CreateLogger<OAuth2IntrospectionHandler>();
6746
_cache = cache;
6847
}
69-
#endif
70-
7148

7249
/// <summary>
7350
/// The handler calls methods on the events which give the application control at certain points where processing is occurring.
@@ -292,4 +269,4 @@ private static async Task<AuthenticateResult> CreateTicket(
292269
return tokenValidatedContext.Result;
293270
}
294271
}
295-
}
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+
}

test/Tests/Configuration.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
using FluentAssertions;
55
using IdentityModel.AspNetCore.OAuth2Introspection;
6-
using IdentityModel.Client;
6+
using Duende.IdentityModel.Client;
77
using System;
88
using System.Threading.Tasks;
99
using Tests.Util;
@@ -125,4 +125,4 @@ public async Task Authority_Get_Introspection_Endpoint()
125125
ops.IntrospectionEndpoint.Should().Be("https://authority.com/introspection_endpoint");
126126
}
127127
}
128-
}
128+
}

0 commit comments

Comments
 (0)