Beispiel #1
0
 /// <summary>
 /// Creates a new instance of <see cref="AccessControlMiddleware"/>
 /// </summary>
 /// <param name="next">The delegate representing the next middleware in the request pipeline.</param>
 /// <param name="options"></param>
 /// <param name="logger">The Logger Factory.</param>
 public AccessControlMiddleware(
     RequestDelegate next,
     IOptions <AccessControlOptions> options,
     ILogger <AccessControlMiddleware> logger)
 {
     _next   = next ?? throw new ArgumentNullException(nameof(next));
     _logger = logger;
     _option = options.Value;
 }
 public AccessControlAuthorizationHandler(IHttpContextAccessor contextAccessor, IOptions <AccessControlOptions> options)
 {
     _contextAccessor = contextAccessor;
     _options         = options.Value;
 }