Ejemplo n.º 1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="next"></param>
        /// <param name="loggerFactory"></param>
        /// <param name="options"></param>
        public CertificateForwardingMiddleware(
            RequestDelegate next,
            ILoggerFactory loggerFactory,
            IOptions <CertificateForwardingOptions> options)
        {
            _next = next ?? throw new ArgumentNullException(nameof(next));

            if (loggerFactory == null)
            {
                throw new ArgumentNullException(nameof(loggerFactory));
            }

            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            _options = options.Value;
            _logger  = loggerFactory.CreateLogger <CertificateForwardingMiddleware>();
        }
Ejemplo n.º 2
0
 public CertificateForwardingFeature(ILogger logger, StringValues header, CertificateForwardingOptions options)
 {
     _logger  = logger;
     _options = options;
     _header  = header;
 }