Пример #1
0
 public static IApplicationBuilder UseAuthenticate(this IApplicationBuilder builder, AuthenticateOption option)
 {
     return(builder.UseMiddleware <AuthenticateMiddleware>(option));
 }
Пример #2
0
 public AuthenticateMiddleware(RequestDelegate next, AuthenticateOption option = null)
 {
     _next   = next;
     _option = option ?? new AuthenticateOption();
 }