Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for .NET 6/7 #98

Merged
merged 1 commit into from
Apr 30, 2024
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
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
Loading