コード例 #1
0
 /// <summary>
 /// This constructor should be available on production, !!! IMPORTANT !!!
 /// Only for unit tests
 /// </summary>
 /// <param name="next"></param>
 /// <param name="loggerFactory"></param>
 /// <param name="options"></param>
 /// <param name="authenticationService"></param>
 public AuthenticationMiddleware(RequestDelegate next, ILoggerFactory loggerFactory, AuthenticationOptions options, IAuthenticationService authenticationService)
 {
     _next    = next;
     _logger  = loggerFactory.CreateLogger <AuthenticationMiddleware>();
     _options = options;
     _authenticationService = authenticationService;
 }
コード例 #2
0
 public AuthenticationMiddleware(RequestDelegate next, ILoggerFactory loggerFactory, AuthenticationOptions options)
 {
     _next    = next;
     _logger  = loggerFactory.CreateLogger <AuthenticationMiddleware>();
     _options = options;
     if (_authenticationService == null)
     {
         _authenticationService = new AuthenticationService();
     }
 }