Esempio n. 1
0
 public ServiceLoginMiddleware(RequestDelegate next,
                               //IHostingEnvironment hostingEnvironment,
                               IConfiguration configuration,
                               ILoggerFactory loggerFactory,
                               IOptions <ServiceLoginOptions> options)
 {
     _next = next;
     //_hostingEnvironment = hostingEnvironment;
     _configuration = configuration;
     _logger        = loggerFactory.CreateLogger <ServiceLoginMiddleware>();
     _options       = options.Value;
 }
Esempio n. 2
0
 public static IApplicationBuilder UseServiceLoginMiddleware(this IApplicationBuilder app, ServiceLoginOptions options)
 {
     return(app.UseMiddleware <ServiceLoginMiddleware>(Options.Create(options)));
 }