Example #1
0
        // 用户登录认证
        public static LoginInfoDTO Login(string UserName, string PassWord)
        {
            string strUserName = "******" + UserName;
            string strPassWord = "******" + PassWord;
            string strSuffix   = "&grant_type=password&client_id=toptimus_client&client_secret=123456";
            string url         = XindianAppConfig.businessServiceUri + "/oauth/token" + strUserName + strPassWord + strSuffix;
            string rv          = RestCall.PostHttp(url, "");

            if (string.IsNullOrEmpty(rv))
            {
                return(null);
            }

            LoginInfoDTO ret = Newtonsoft.Json.JsonConvert.DeserializeObject <LoginInfoDTO>(rv);

            return(ret);
        }