Skip to content

Commit

Permalink
Merge pull request #91 from DuendeSoftware/ev/atm/ClientCredentialsTo…
Browse files Browse the repository at this point in the history
…kenManagementBuilder-services-public

atm - Make ClientCredentialsTokenManagementBuilder.Services a public property
  • Loading branch information
Erwinvandervalk authored Feb 10, 2025
2 parents 9e8638e + 497c9ff commit 3fb5402
Showing 1 changed file with 3 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,9 @@ namespace Microsoft.Extensions.DependencyInjection;
/// <summary>
/// Builder for client credential clients
/// </summary>
public class ClientCredentialsTokenManagementBuilder
public class ClientCredentialsTokenManagementBuilder(IServiceCollection services)
{
private readonly IServiceCollection _services;

/// <summary>
/// ctor
/// </summary>
/// <param name="services"></param>
public ClientCredentialsTokenManagementBuilder(IServiceCollection services)
{
_services = services;
}
public IServiceCollection Services { get; } = services;

/// <summary>
/// Adds a client credentials client to the token management system
Expand All @@ -29,7 +20,7 @@ public ClientCredentialsTokenManagementBuilder(IServiceCollection services)
/// <returns></returns>
public ClientCredentialsTokenManagementBuilder AddClient(string name, Action<ClientCredentialsClient> configureOptions)
{
_services.Configure(name, configureOptions);
Services.Configure(name, configureOptions);
return this;
}
}

0 comments on commit 3fb5402

Please sign in to comment.