예제 #1
0
        /// <summary>
        /// API授权验证 1:验证通过,0:无权限
        /// </summary>
        /// <param name="appid"></param>
        /// <param name="apppwd"></param>
        /// <param name="signname"></param>
        /// <param name="time"></param>
        /// <param name="functionName"></param>
        /// <param name="appUrl"></param>
        /// <param name="code"></param>
        /// <returns></returns>
        public static int ApiAuthorizationVerify(JObject sinfoObj, JObject infoObj, string functionname, out UserCheck _uc)
        {
            _uc = null;
            string securityJson = WebCommon.ApiSecurityStringOfJson(sinfoObj, functionname, infoObj, "companysix");
            string returntext   = "";
            int    returntype   = 1;

            _uc = WebCommon.FxtUserCenterService_GetCompanyBySignName(securityJson, out returntext, out returntype);
            if (returntype == 1)
            {
                return(1);
            }
            return(0);
            ////未获取到key
            //string appKey = ApiFunctionArgsVerify(appid, apppwd, signname, functionName, appUrl);
            //if (string.IsNullOrEmpty(appKey))
            //{
            //    return 0;
            //}
            ////加密验证
            //int result = ApiCodeVerify(appid, apppwd, signname, time, code);
            //if (result != 1)
            //{
            //    return 0;
            //}
            //return 1;
        }