gandalf-reborn/Security/Scheme/GandalfRebornJwtTokenAuthExtensions.cs
2025-03-02 12:51:02 +01:00

14 lines
552 B
C#

using Microsoft.Extensions.DependencyInjection;
namespace Security.Scheme;
public static class GandalfRebornJwtTokenAuthExtensions
{
private const string SchemeName = "GandalfRebornJwtTokenAuthScheme";
public static IServiceCollection AddGandalfRebornJwtTokenAuth(this IServiceCollection services, Action<GandalfRebornJwtTokenAuthSchemeOptions> options)
{
services.AddAuthentication().AddScheme<GandalfRebornJwtTokenAuthSchemeOptions, GandalfRebornJwtTokenAuthSchemeHandler>(SchemeName, options);
return services;
}
}