Added skoruba user service integration test

This commit is contained in:
2026-10-10 15:31:36 +02:00
parent 343f405982
commit 8eca793f5f
12 changed files with 248 additions and 41 deletions
@@ -24,23 +24,20 @@ public static class Security
if (!authOptions.Authority.EndsWith('/')) authOptions.Authority += "/";
services.AddClientCredentialsTokenManagement()
services.AddClientCredentialsTokenManagement()
.AddClient(SkorubaCredentialClient, client =>
{
client.TokenEndpoint = new Uri($"{authOptions.Authority}connect/token");
client.ClientId = ClientId.Parse(authOptions.ClientId!);
client.ClientSecret = ClientSecret.Parse(authOptions.ClientSecret!);
client.Scope = Duende.AccessTokenManagement.Scope.ParseOrDefault(authOptions.Scope);
});
});
services.AddHttpClient(SkorubaHttpClient, client =>
{
client.BaseAddress = new Uri(configuration.GetConnectionString("SkorubaApi")!);
}).AddClientCredentialsTokenHandler(ClientCredentialsClientName.Parse(SkorubaCredentialClient));
services.AddKeyedScoped(SkorubaHttpClient, (provider, key) =>
provider.GetRequiredService<IHttpClientFactory>());
services.AddScoped<AuditInterceptor>();
services.AddScoped<LoggingInterceptor>();
services.AddSingleton<ProxyGenerator>();