diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7382ff011..1fe729ec2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -56,7 +56,7 @@ jobs: - uses: actions/setup-dotnet@v3 with: - dotnet-version: '7.0.202' + dotnet-version: '8.0.x' - name: Restore run: dotnet restore @@ -80,7 +80,7 @@ jobs: echo "::notice::Linting entire codebase" fi - dotnet tool install -g dotnet-format --version "7.*" --add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json >/dev/null + dotnet tool install -g dotnet-format --version "8.*" --add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json >/dev/null dotnet-format --no-restore --verify-no-changes $INCLUDE_ARG env: EVENT_NAME: ${{ github.event_name }} diff --git a/dotnet-authserver/TeacherIdentity.sln b/dotnet-authserver/TeacherIdentity.sln index 7e143a369..c6aa200b1 100644 --- a/dotnet-authserver/TeacherIdentity.sln +++ b/dotnet-authserver/TeacherIdentity.sln @@ -11,7 +11,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution ProjectSection(SolutionItems) = preProject .editorconfig = .editorconfig Directory.Build.props = Directory.Build.props - global.json = global.json nuget.config = nuget.config EndProjectSection EndProject diff --git a/dotnet-authserver/global.json b/dotnet-authserver/global.json deleted file mode 100644 index a30ecd118..000000000 --- a/dotnet-authserver/global.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "sdk": { - "version": "7.0.202", - "rollForward": "latestMinor" - } -} diff --git a/dotnet-authserver/src/TeacherIdentity.AuthServer/Dockerfile b/dotnet-authserver/src/TeacherIdentity.AuthServer/Dockerfile index 0724effc4..897a52bd4 100644 --- a/dotnet-authserver/src/TeacherIdentity.AuthServer/Dockerfile +++ b/dotnet-authserver/src/TeacherIdentity.AuthServer/Dockerfile @@ -1,8 +1,8 @@ # syntax=docker/dockerfile:1 -FROM mcr.microsoft.com/dotnet/aspnet:7.0 +FROM mcr.microsoft.com/dotnet/aspnet:8.0 ARG GIT_SHA -COPY bin/Release/net7.0/publish/ App/ +COPY bin/Release/net8.0/publish/ App/ ENV GitSha ${GIT_SHA} WORKDIR /App diff --git a/dotnet-authserver/src/TeacherIdentity.AuthServer/Infrastructure/Security/ApiKeyAuthenticationHandler.cs b/dotnet-authserver/src/TeacherIdentity.AuthServer/Infrastructure/Security/ApiKeyAuthenticationHandler.cs index 9cd6acd4e..696ba32bb 100644 --- a/dotnet-authserver/src/TeacherIdentity.AuthServer/Infrastructure/Security/ApiKeyAuthenticationHandler.cs +++ b/dotnet-authserver/src/TeacherIdentity.AuthServer/Infrastructure/Security/ApiKeyAuthenticationHandler.cs @@ -14,12 +14,10 @@ public class ApiKeyAuthenticationHandler : AuthenticationHandler options, ILoggerFactory logger, UrlEncoder encoder, - ISystemClock clock) - : base(options, logger, encoder, clock) + IApiClientRepository clientRepository) : base(options, logger, encoder) { _clientRepository = clientRepository; } diff --git a/dotnet-authserver/src/TeacherIdentity.AuthServer/Program.cs b/dotnet-authserver/src/TeacherIdentity.AuthServer/Program.cs index f63b2da88..86e54c9f8 100644 --- a/dotnet-authserver/src/TeacherIdentity.AuthServer/Program.cs +++ b/dotnet-authserver/src/TeacherIdentity.AuthServer/Program.cs @@ -566,7 +566,7 @@ public static async Task Main(string[] args) { options.PreSerializeFilters.Add((_, request) => { - request.HttpContext.Response.Headers.Add("Cache-Control", "no-cache, no-store, must-revalidate"); + request.HttpContext.Response.Headers.TryAdd("Cache-Control", "no-cache, no-store, must-revalidate"); }); }); diff --git a/dotnet-authserver/src/TeacherIdentity.AuthServer/TeacherIdentity.AuthServer.csproj b/dotnet-authserver/src/TeacherIdentity.AuthServer/TeacherIdentity.AuthServer.csproj index 168cc164e..8dfa10654 100644 --- a/dotnet-authserver/src/TeacherIdentity.AuthServer/TeacherIdentity.AuthServer.csproj +++ b/dotnet-authserver/src/TeacherIdentity.AuthServer/TeacherIdentity.AuthServer.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 TeacherIdentityServer diff --git a/dotnet-authserver/src/TeacherIdentity.ClientCredentialsSample/TeacherIdentity.ClientCredentialsSample.csproj b/dotnet-authserver/src/TeacherIdentity.ClientCredentialsSample/TeacherIdentity.ClientCredentialsSample.csproj index 120e38c31..a269962b5 100644 --- a/dotnet-authserver/src/TeacherIdentity.ClientCredentialsSample/TeacherIdentity.ClientCredentialsSample.csproj +++ b/dotnet-authserver/src/TeacherIdentity.ClientCredentialsSample/TeacherIdentity.ClientCredentialsSample.csproj @@ -2,7 +2,7 @@ Exe - net7.0 + net8.0 diff --git a/dotnet-authserver/src/TeacherIdentity.DevBootstrap/TeacherIdentity.DevBootstrap.csproj b/dotnet-authserver/src/TeacherIdentity.DevBootstrap/TeacherIdentity.DevBootstrap.csproj index dd12761ee..62d1c9e51 100644 --- a/dotnet-authserver/src/TeacherIdentity.DevBootstrap/TeacherIdentity.DevBootstrap.csproj +++ b/dotnet-authserver/src/TeacherIdentity.DevBootstrap/TeacherIdentity.DevBootstrap.csproj @@ -2,7 +2,7 @@ Exe - net7.0 + net8.0 TeacherIdentityServer diff --git a/dotnet-authserver/src/TeacherIdentity.KeyGenerator/TeacherIdentity.KeyGenerator.csproj b/dotnet-authserver/src/TeacherIdentity.KeyGenerator/TeacherIdentity.KeyGenerator.csproj index 120e38c31..a269962b5 100644 --- a/dotnet-authserver/src/TeacherIdentity.KeyGenerator/TeacherIdentity.KeyGenerator.csproj +++ b/dotnet-authserver/src/TeacherIdentity.KeyGenerator/TeacherIdentity.KeyGenerator.csproj @@ -2,7 +2,7 @@ Exe - net7.0 + net8.0 diff --git a/dotnet-authserver/src/TeacherIdentity.SampleApi/TeacherIdentity.SampleApi.csproj b/dotnet-authserver/src/TeacherIdentity.SampleApi/TeacherIdentity.SampleApi.csproj index 073fb1bcd..90bf760c5 100644 --- a/dotnet-authserver/src/TeacherIdentity.SampleApi/TeacherIdentity.SampleApi.csproj +++ b/dotnet-authserver/src/TeacherIdentity.SampleApi/TeacherIdentity.SampleApi.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 diff --git a/dotnet-authserver/src/TeacherIdentity.TestClient/Dockerfile b/dotnet-authserver/src/TeacherIdentity.TestClient/Dockerfile index 908295808..de54c5d31 100644 --- a/dotnet-authserver/src/TeacherIdentity.TestClient/Dockerfile +++ b/dotnet-authserver/src/TeacherIdentity.TestClient/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 - FROM mcr.microsoft.com/dotnet/aspnet:7.0 - COPY bin/Release/net7.0/publish/ App/ + FROM mcr.microsoft.com/dotnet/aspnet:8.0 + COPY bin/Release/net8.0/publish/ App/ WORKDIR /App ENTRYPOINT ["dotnet", "TeacherIdentity.TestClient.dll"] EXPOSE 80 diff --git a/dotnet-authserver/src/TeacherIdentity.TestClient/TeacherIdentity.TestClient.csproj b/dotnet-authserver/src/TeacherIdentity.TestClient/TeacherIdentity.TestClient.csproj index 2ac68ac81..cc2f10566 100644 --- a/dotnet-authserver/src/TeacherIdentity.TestClient/TeacherIdentity.TestClient.csproj +++ b/dotnet-authserver/src/TeacherIdentity.TestClient/TeacherIdentity.TestClient.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 diff --git a/dotnet-authserver/tests/TeacherIdentity.AuthServer.EndToEndTests/TeacherIdentity.AuthServer.EndToEndTests.csproj b/dotnet-authserver/tests/TeacherIdentity.AuthServer.EndToEndTests/TeacherIdentity.AuthServer.EndToEndTests.csproj index 2db85f298..35f1fa173 100644 --- a/dotnet-authserver/tests/TeacherIdentity.AuthServer.EndToEndTests/TeacherIdentity.AuthServer.EndToEndTests.csproj +++ b/dotnet-authserver/tests/TeacherIdentity.AuthServer.EndToEndTests/TeacherIdentity.AuthServer.EndToEndTests.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 TeacherIdentityServerEndToEndTests true false diff --git a/dotnet-authserver/tests/TeacherIdentity.AuthServer.SmokeTests/TeacherIdentity.AuthServer.SmokeTests.csproj b/dotnet-authserver/tests/TeacherIdentity.AuthServer.SmokeTests/TeacherIdentity.AuthServer.SmokeTests.csproj index 616758419..01235a7dc 100644 --- a/dotnet-authserver/tests/TeacherIdentity.AuthServer.SmokeTests/TeacherIdentity.AuthServer.SmokeTests.csproj +++ b/dotnet-authserver/tests/TeacherIdentity.AuthServer.SmokeTests/TeacherIdentity.AuthServer.SmokeTests.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 false $(MSBuildProjectDirectory)\local.runsettings diff --git a/dotnet-authserver/tests/TeacherIdentity.AuthServer.TestCommon/TeacherIdentity.AuthServer.TestCommon.csproj b/dotnet-authserver/tests/TeacherIdentity.AuthServer.TestCommon/TeacherIdentity.AuthServer.TestCommon.csproj index c189f0ddc..18a405676 100644 --- a/dotnet-authserver/tests/TeacherIdentity.AuthServer.TestCommon/TeacherIdentity.AuthServer.TestCommon.csproj +++ b/dotnet-authserver/tests/TeacherIdentity.AuthServer.TestCommon/TeacherIdentity.AuthServer.TestCommon.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 false diff --git a/dotnet-authserver/tests/TeacherIdentity.AuthServer.Tests/Infrastructure/TestCookieAuthenticationHandler.cs b/dotnet-authserver/tests/TeacherIdentity.AuthServer.Tests/Infrastructure/TestCookieAuthenticationHandler.cs index 74fc919da..93616918e 100644 --- a/dotnet-authserver/tests/TeacherIdentity.AuthServer.Tests/Infrastructure/TestCookieAuthenticationHandler.cs +++ b/dotnet-authserver/tests/TeacherIdentity.AuthServer.Tests/Infrastructure/TestCookieAuthenticationHandler.cs @@ -12,11 +12,10 @@ public class TestCookieAuthenticationHandler : CookieAuthenticationHandler private readonly CurrentUserIdContainer _currentUserIdContainer; public TestCookieAuthenticationHandler( - CurrentUserIdContainer currentUserIdContainer, IOptionsMonitor options, ILoggerFactory logger, UrlEncoder encoder, - ISystemClock clock) : base(options, logger, encoder, clock) + CurrentUserIdContainer currentUserIdContainer) : base(options, logger, encoder) { _currentUserIdContainer = currentUserIdContainer; } diff --git a/dotnet-authserver/tests/TeacherIdentity.AuthServer.Tests/TeacherIdentity.AuthServer.Tests.csproj b/dotnet-authserver/tests/TeacherIdentity.AuthServer.Tests/TeacherIdentity.AuthServer.Tests.csproj index 33742d9f2..7c353b746 100644 --- a/dotnet-authserver/tests/TeacherIdentity.AuthServer.Tests/TeacherIdentity.AuthServer.Tests.csproj +++ b/dotnet-authserver/tests/TeacherIdentity.AuthServer.Tests/TeacherIdentity.AuthServer.Tests.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 TeacherIdentityAuthServerTests true false