Beispiel #1
0
        public async Task InvokeAsync(HttpContext httpContext, IDomainContextAccessor contextAccessor)
        {
            var context = new DomainContext();

            context.JobInfo = new Job {
                JobId = Guid.NewGuid().ToString(), ThreadId = Thread.CurrentThread.ManagedThreadId, Start = DateTime.Now
            };

            DomainContext.Current = context;

            await _next(httpContext);
        }
 public UserAuthenticationHandler(IOptionsMonitor <UserAuthenticationOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock,
                                  IDomainContextAccessor contextAccessor) : base(options, logger, encoder, clock)
 {
     _contextAccessor = contextAccessor;
 }