public async Task InvokeAsync(HttpContext context) { var token = context.Request.Headers["Authorization"].ToString(); context.SetUser(tokenProvider.TryGetUser(token)); await next(context); }