Exemple #1
0
        /// <summary>
        /// 获取Web授权地址
        /// </summary>
        /// <returns></returns>
        public static string GetAuthUrl(string callback)
        {
            string url = Stands.AUTH_HOST + "/Authorize/Index";
            //回调地址
            string callBackUrl = WebUtils.CurrentHost() + "/" + Stands.CallBackController + "/CallBack/?" + Stands.BEFORE_REQUEST_URL + "=" + HttpUtility.UrlEncode(callback);

            CJClient client = new CJClient();
            CJDictionary dic = new CJDictionary { { "projectCode", Stands.PROJECT_CODE }, { "auth_type", (int)Stands.AuthType } };
            DateTime timestamp = DateTime.Now;
            return client.BuildAuthUrl(url, "", Stands.SIGN_SECRET, callBackUrl, dic, timestamp);
        }