public ActionResult GetSign(string param)
        {
            var sign = ApiCommon.GetSignature(param, Request);

            return(Json(new
            {
                sign = sign,
            }, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 2
0
        /// <summary>
        /// 参数检查
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        protected bool VerifyParam(string param)
        {
            var sign = ApiCommon.GetSignature(param, Request);

            if (Request["sign"].ToLower() != sign)
            {
                log.Error("sign error!" + sign);

                return(false);
            }
            else
            {
                log.Debug("sign success!");
                return(true);
            }
        }