From bf4e745b6a8f18995f8635c3042565194382910c Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Wed, 15 Feb 2023 13:56:45 +0100 Subject: [PATCH] Updated OpenIddict to v4 (#13830) * Updated OpenIddict to v4 and when through the migration guide. (SetAuthorizationEndpointUris and SetTokenEndpointUris should not start with a leading / anymore) * Fixed issue where the old backoffice did not build * Fixed build * Fake a change - hopefully npm can see the file now? * try using npm install instead of npm ci * Another trial * remove build of old backoffice * Oops build new backoffice - not the old * rollback changes to static assets * Foreach csproj file instead. Fix for breaking change in dotnet sdk 7.0.200 --- build/azure-pipelines.yml | 5 ++++- .../DependencyInjection/BackOfficeAuthBuilderExtensions.cs | 4 ++-- .../Umbraco.Cms.Api.Management.csproj | 4 ++-- .../Umbraco.New.Cms.Infrastructure.csproj | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index da728fffb3..ff52d3c2aa 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -110,7 +110,10 @@ stages: } } - dotnet pack $(solution) --configuration $(buildConfiguration) --no-build --output $(Build.ArtifactStagingDirectory)/nupkg + foreach($csproj in Get-ChildItem –Path "src/" -Recurse -Filter *.csproj) + { + dotnet pack $csproj --configuration $(buildConfiguration) --no-build --output $(Build.ArtifactStagingDirectory)/nupkg + } - script: | sha="$(Build.SourceVersion)" sha=${sha:0:7} diff --git a/src/Umbraco.Cms.Api.Management/DependencyInjection/BackOfficeAuthBuilderExtensions.cs b/src/Umbraco.Cms.Api.Management/DependencyInjection/BackOfficeAuthBuilderExtensions.cs index 332d744ba4..412886aa71 100644 --- a/src/Umbraco.Cms.Api.Management/DependencyInjection/BackOfficeAuthBuilderExtensions.cs +++ b/src/Umbraco.Cms.Api.Management/DependencyInjection/BackOfficeAuthBuilderExtensions.cs @@ -59,8 +59,8 @@ public static class BackOfficeAuthBuilderExtensions { // Enable the authorization and token endpoints. options - .SetAuthorizationEndpointUris(Controllers.Security.Paths.BackOfficeApiAuthorizationEndpoint) - .SetTokenEndpointUris(Controllers.Security.Paths.BackOfficeApiTokenEndpoint); + .SetAuthorizationEndpointUris(Controllers.Security.Paths.BackOfficeApiAuthorizationEndpoint.TrimStart('/')) + .SetTokenEndpointUris(Controllers.Security.Paths.BackOfficeApiTokenEndpoint.TrimStart('/')); // Enable authorization code flow with PKCE options diff --git a/src/Umbraco.Cms.Api.Management/Umbraco.Cms.Api.Management.csproj b/src/Umbraco.Cms.Api.Management/Umbraco.Cms.Api.Management.csproj index 38c3bedc03..28e15c20c7 100644 --- a/src/Umbraco.Cms.Api.Management/Umbraco.Cms.Api.Management.csproj +++ b/src/Umbraco.Cms.Api.Management/Umbraco.Cms.Api.Management.csproj @@ -13,8 +13,8 @@ - - + + diff --git a/src/Umbraco.New.Cms.Infrastructure/Umbraco.New.Cms.Infrastructure.csproj b/src/Umbraco.New.Cms.Infrastructure/Umbraco.New.Cms.Infrastructure.csproj index 82159079a4..4038651a0a 100644 --- a/src/Umbraco.New.Cms.Infrastructure/Umbraco.New.Cms.Infrastructure.csproj +++ b/src/Umbraco.New.Cms.Infrastructure/Umbraco.New.Cms.Infrastructure.csproj @@ -12,6 +12,6 @@ - +