Initial commit
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
using Backend.Options;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
|
||||
namespace Backend.Security.Authentication {
|
||||
public static class JwtTokenAuthenticationExtensions {
|
||||
public static AuthenticationBuilder AddJwtTokenAuthentication(this AuthenticationBuilder builder,
|
||||
IConfiguration configuration) {
|
||||
builder.Services.AddOptionsFromConfiguration<JwtTokenAuthenticationOptions>(configuration);
|
||||
|
||||
return builder.AddScheme<JwtTokenAuthenticationHandlerOptions, JwtTokenAuthenticationHandler>(
|
||||
JwtTokenAuthentication.Scheme,
|
||||
_ => { });
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user