DotBased/DotBased.ASP.Auth/DotBasedAuthDependencyInjection.cs

18 lines
716 B
C#
Raw Normal View History

2024-07-13 16:27:45 +02:00
using Microsoft.Extensions.DependencyInjection;
namespace DotBased.ASP.Auth;
public static class DotBasedAuthDependencyInjection
{
/// <summary>
/// Use the DotBased authentication implementation
/// </summary>
/// <remarks>Use the app.UseAuthentication() and app.UseAuthorization()!</remarks>
/// <param name="services">Service collection</param>
2024-07-13 16:27:45 +02:00
/// <param name="configurationAction">DotBased auth configuration</param>
public static BasedAuthBuilder UseBasedServerAuth(this IServiceCollection services, Action<BasedAuthConfiguration>? configurationAction = null)
2024-07-13 16:27:45 +02:00
{
var authBuilder = new BasedAuthBuilder(services, configurationAction);
return authBuilder;
2024-07-13 16:27:45 +02:00
}
}