diff --git a/paket.dependencies b/paket.dependencies index 7147fe2f5..83493e732 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -49,7 +49,7 @@ nuget Be.Vlaanderen.Basisregisters.Snapshotverifier 9.1.1 nuget Be.Vlaanderen.Basisregisters.Api 23.1.0 -nuget Be.Vlaanderen.Basisregisters.Auth.AcmIdm 3.0.0 +nuget Be.Vlaanderen.Basisregisters.Auth.AcmIdm 3.3.0 nuget Be.Vlaanderen.Basisregisters.Aws.DistributedMutex 4.0.1 nuget Be.Vlaanderen.Basisregisters.Aws.Lambda 4.0.0 diff --git a/paket.lock b/paket.lock index dd797c4be..2e8740eca 100644 --- a/paket.lock +++ b/paket.lock @@ -199,8 +199,8 @@ NUGET NSwag.CodeGeneration.CSharp (>= 14.0.3) NSwag.CodeGeneration.TypeScript (>= 14.0.3) Swashbuckle.AspNetCore (6.2.3) - Be.Vlaanderen.Basisregisters.Auth.AcmIdm (3.0) - Be.Vlaanderen.Basisregisters.NisCodeService.Abstractions (>= 2.0) + Be.Vlaanderen.Basisregisters.Auth.AcmIdm (3.3) + Be.Vlaanderen.Basisregisters.NisCodeService.Abstractions (>= 5.0) IdentityModel.AspNetCore.OAuth2Introspection (>= 6.2) Microsoft.AspNetCore.Authentication.JwtBearer (>= 8.0.3) Microsoft.Extensions.DependencyInjection (>= 8.0) @@ -330,7 +330,7 @@ NUGET Confluent.Kafka (>= 2.3) Newtonsoft.Json (>= 13.0.3) Be.Vlaanderen.Basisregisters.Middleware.AddProblemJsonHeader (3.0) - Be.Vlaanderen.Basisregisters.NisCodeService.Abstractions (2.0) + Be.Vlaanderen.Basisregisters.NisCodeService.Abstractions (5.0) Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.1) Microsoft.Extensions.Logging.Abstractions (>= 8.0.1) Be.Vlaanderen.Basisregisters.ProblemDetails (9.0) diff --git a/src/BuildingRegistry.Api.BackOffice/Infrastructure/Startup.cs b/src/BuildingRegistry.Api.BackOffice/Infrastructure/Startup.cs index d78671bf9..a955e3ce4 100644 --- a/src/BuildingRegistry.Api.BackOffice/Infrastructure/Startup.cs +++ b/src/BuildingRegistry.Api.BackOffice/Infrastructure/Startup.cs @@ -56,7 +56,10 @@ public IServiceProvider ConfigureServices(IServiceCollection services) ? baseUrl.Substring(0, baseUrl.Length - 1) : baseUrl; - services.AddAcmIdmAuthentication(oAuth2IntrospectionOptions!); + services + .AddDistributedMemoryCache() + .AddAcmIdmAuthentication(oAuth2IntrospectionOptions!); + services .ConfigureDefaultForApi(new StartupConfigureOptions { diff --git a/src/BuildingRegistry.Api.BackOffice/appsettings.json b/src/BuildingRegistry.Api.BackOffice/appsettings.json index 556c744ed..e5e359d68 100644 --- a/src/BuildingRegistry.Api.BackOffice/appsettings.json +++ b/src/BuildingRegistry.Api.BackOffice/appsettings.json @@ -15,7 +15,8 @@ "ClientId": "acmidmconsumer.webapi", "ClientSecret": "a_very=Secr3t*Key", "Authority": "http://localhost:5051", - "IntrospectionEndpoint": "http://localhost:5051/connect/introspect" + "IntrospectionEndpoint": "http://localhost:5051/connect/introspect", + "EnableCaching": true }, "NisCodeServiceUrl": "https://niscode.ops-api.basisregisters.dev-vlaanderen.be",