using Monitoring.Infrastructure.Services;

namespace Monitoring.Services;

public static class DependencyInjectionExtensions
{
	public static IServiceCollection AddServices(this IServiceCollection services,
		string issuer, string audience, string key)
	{
		_ = services.AddScoped(provider =>
		{
			return new AuthenticationService(issuer, audience, key);
		});

		_ = services.AddScoped<TokenService>();
		_ = services.AddScoped<PasswordService>();
		_ = services.AddScoped<UsersService>();

		return services;
	}
}
