/// <summary>Invoke
        /// </summary>
        public async Task InvokeAsync(RestExecuteContext context)
        {
            if (!_option.RestOption.EnableJwt)
            {
                await _next.Invoke(context);

                return;
            }

            try
            {
                //上传,删除文件之前获取Jwt
                if (IsPreAuthRequestAuth(context.Request.GetType()))
                {
                    //Assign Jwt
                    var jwt = _jwtManager.GetAssignJwt(context.Request.Fid);

                    //添加认证头部
                    context.Builder.AddParameter("Authorization", jwt, ParameterType.HttpHeader);
                }
            }
            catch (Exception ex)
            {
                SetPipelineError(context, new AssignJwtError($"UploadAuthentication出错,{ex.Message}"));
                return;
            }

            await _next.Invoke(context);
        }