Skip to content

Commit

Permalink
Merge pull request #98 from DuendeSoftware/joe/drop-net6
Browse files Browse the repository at this point in the history
Drop support for .NET 6/7
  • Loading branch information
brockallen authored Apr 30, 2024
2 parents 8d2c405 + f705097 commit 9c49699
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 25 deletions.
8 changes: 0 additions & 8 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@
<IdentityServerVersion>7.0.4</IdentityServerVersion>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net6.0'">
<FrameworkVersion>6.0.26</FrameworkVersion>
<ExtensionsVersion>6.0.0</ExtensionsVersion>
<WilsonVersion>6.35.0</WilsonVersion>
<IdentityServerVersion>6.3.6</IdentityServerVersion>
</PropertyGroup>


<ItemGroup>
<!-- ASP.NET -->
<PackageReference Update="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="$(FrameworkVersion)" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<Nullable>enable</Nullable>
<GenerateDocumentationFile>true</GenerateDocumentationFile>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@ public class UserAccessAccessTokenManagementService : IUserTokenManagementServic
{
private readonly IUserTokenRequestSynchronization _sync;
private readonly IUserTokenStore _userAccessTokenStore;
#if NET8_0_OR_GREATER
private readonly TimeProvider _clock;
#else
private readonly ISystemClock _clock;
#endif
private readonly UserTokenManagementOptions _options;
private readonly IUserTokenEndpointService _tokenEndpointService;
private readonly ILogger<UserAccessAccessTokenManagementService> _logger;
Expand All @@ -40,11 +36,7 @@ public class UserAccessAccessTokenManagementService : IUserTokenManagementServic
public UserAccessAccessTokenManagementService(
IUserTokenRequestSynchronization sync,
IUserTokenStore userAccessTokenStore,
#if NET8_0_OR_GREATER
TimeProvider clock,
#else
ISystemClock clock,
#endif
IOptions<UserTokenManagementOptions> options,
IUserTokenEndpointService tokenEndpointService,
ILogger<UserAccessAccessTokenManagementService> logger)
Expand Down Expand Up @@ -100,11 +92,7 @@ public async Task<UserToken> GetAccessTokenAsync(
}

var dtRefresh = userToken.Expiration.Subtract(_options.RefreshBeforeExpiration);
#if NET8_0_OR_GREATER
var utcNow = _clock.GetUtcNow();
#else
var utcNow = _clock.UtcNow;
#endif
if (dtRefresh < utcNow || parameters.ForceRenewal || needsRenewal)
{
_logger.LogDebug("Token for user {user} needs refreshing.", userName);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<Nullable>enable</Nullable>
<GenerateDocumentationFile>true</GenerateDocumentationFile>

Expand Down
2 changes: 0 additions & 2 deletions test/Tests/Framework/TestLoggerProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ public void Dispose()
}

public IDisposable BeginScope<TState>(TState state)
#if NET8_0_OR_GREATER
where TState : notnull
#endif
{
return this;
}
Expand Down
2 changes: 1 addition & 1 deletion test/Tests/Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

Expand Down

0 comments on commit 9c49699

Please sign in to comment.