Exemplo n.º 1
0
        /// <summary>
        /// 获取cookie参数
        /// </summary>
        /// <param name="Request"></param>
        /// <returns></returns>
        public static APCookie GetCookie(HttpRequestBase Request)
        {
            APCookie apCookie = new APCookie();

            apCookie.app_key     = ReadCookie("app_key") != ""? ReadCookie("app_key"): "1005";
            apCookie.app_secret  = ReadCookie("app_secret") != ""? ReadCookie("app_secret"): "77A8799C9E43";
            apCookie.app_session = ReadCookie("app_session") != ""? ReadCookie("app_session"): "DEEACA5342B646A7BE08740438C20810";
            apCookie.unit_id     = ReadCookie("unit_id");
            return(apCookie);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 获取服务端登录返回的验证参数
        /// </summary>
        /// <param name="Request">Request</param>
        /// <param name="method">接口</param>
        /// <returns></returns>
        public static AuthorizationParams getParams(HttpRequestBase Request, string method)
        {
            APCookie            apCookie            = CookieHelper.GetCookie(Request);
            AuthorizationParams authorizationParams = new AuthorizationParams();

            // 必须
            authorizationParams.APP_KEY    = apCookie.app_key;
            authorizationParams.SESSION    = apCookie.app_session;
            authorizationParams.APP_SECRET = apCookie.app_secret;
            authorizationParams.METHOD     = method;
            return(authorizationParams);
        }