Added skoruba user service integration test
This commit is contained in:
@@ -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>();
|
||||
|
||||
Reference in New Issue
Block a user