From 3c0cfabecb791e3992f51a7718e729f0a5171c50 Mon Sep 17 00:00:00 2001 From: Martin Gunnerud Date: Thu, 21 Nov 2024 11:11:30 +0100 Subject: [PATCH] chore(resource-adm): do not exchange maskinporten token to altinn token when publishing resource (#14097) --- backend/src/Designer/Infrastructure/ServiceRegistration.cs | 1 - backend/src/Designer/Program.cs | 2 +- .../Designer/Services/Implementation/ResourceRegistryService.cs | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/backend/src/Designer/Infrastructure/ServiceRegistration.cs b/backend/src/Designer/Infrastructure/ServiceRegistration.cs index e91ca200073..8aba45e2e11 100644 --- a/backend/src/Designer/Infrastructure/ServiceRegistration.cs +++ b/backend/src/Designer/Infrastructure/ServiceRegistration.cs @@ -73,7 +73,6 @@ public static IServiceCollection RegisterServiceImplementations(this IServiceCol services.AddTransient(); services.AddTransient(); services.AddTransient(); - services.AddTransient(); services.AddTransient(); services.AddTransient(); services.RegisterDatamodeling(configuration); diff --git a/backend/src/Designer/Program.cs b/backend/src/Designer/Program.cs index e989dacb740..34b5ef65593 100644 --- a/backend/src/Designer/Program.cs +++ b/backend/src/Designer/Program.cs @@ -191,7 +191,7 @@ void ConfigureServices(IServiceCollection services, IConfiguration configuration services.Configure(configuration.GetSection("MaskinportenClientSettings")); var maskinPortenClientName = "MaskinportenClient"; services.RegisterMaskinportenClientDefinition(maskinPortenClientName, configuration.GetSection("MaskinportenClientSettings")); - services.AddHttpClient().AddMaskinportenHttpMessageHandler(maskinPortenClientName); + services.AddHttpClient(); var maskinportenSettings = new MaskinportenClientSettings(); configuration.GetSection("MaskinportenClientSettings").Bind(maskinportenSettings); diff --git a/backend/src/Designer/Services/Implementation/ResourceRegistryService.cs b/backend/src/Designer/Services/Implementation/ResourceRegistryService.cs index b0ec8376379..c33bca20689 100644 --- a/backend/src/Designer/Services/Implementation/ResourceRegistryService.cs +++ b/backend/src/Designer/Services/Implementation/ResourceRegistryService.cs @@ -70,7 +70,6 @@ public async Task PublishServiceResource(ServiceResource serviceRe { publishResourceToResourceRegistryUrl = $"{GetResourceRegistryBaseUrl(env)}{_platformSettings.ResourceRegistryUrl}"; getResourceRegistryUrl = $"{publishResourceToResourceRegistryUrl}/{serviceResource.Identifier}"; - tokenResponse = await _maskinPortenService.ExchangeToAltinnToken(tokenResponse, env); fullWritePolicyToResourceRegistryUrl = $"{GetResourceRegistryBaseUrl(env)}{_platformSettings.ResourceRegistryUrl}/{serviceResource.Identifier}/policy"; } else