14 lines
552 B
C#
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;
|
|
}
|
|
} |