Ejemplo n.º 1
0
        protected override void PrepareArgs(IWebArgs args)
        {
            var wyxArgs = args as WyxWebArgs;

            if (null == wyxArgs)
            {
                return;
            }
            wyxArgs.AppKey    = WyxCache.AppCfg.AppKey;
            wyxArgs.Timestamp = WeiboUtil.GetTimeStamp().ToString();
            if (!this.NoSesssionKey && !string.IsNullOrEmpty(_session.SessionKey))
            {
                wyxArgs.SessionKey = _session.SessionKey;
            }
            var signKeys = wyxArgs.GetCollection().AllKeys;

            Array.Sort(signKeys);
            var    signDic = wyxArgs.ToCollection(true, signKeys);
            string baseStr = WebUtil.BuildEscapeDataString(signDic);

            signDic.Clear();
            wyxArgs.Signature = CryptoUtil.GetSHA1(baseStr + WyxCache.AppCfg.AppSecret, "x2");
        }
Ejemplo n.º 2
0
 protected virtual void PrepareArgs(IWebArgs args)
 {
 }
Ejemplo n.º 3
0
 protected WebClientBase(string uri, IWebArgs getArgs = null, IWebArgs postArgs = null)
 {
     this._baseUri  = uri;
     this._getArgs  = getArgs;
     this._postArgs = postArgs;
 }
Ejemplo n.º 4
0
 protected virtual void PrepareFormArgs(IWebArgs args)
 {
     this.PrepareArgs(args);
 }