蓝微_个人页

个人头像照片 蓝微
个人头像照片
0
3
0

个人介绍

暂无个人介绍

擅长的技术

  • 数据库
获得更多能力
通用技术能力:

暂时未有相关通用技术能力~

云产品技术能力:

暂时未有相关云产品技术能力~

阿里云技能认证

详细说明
  • 提交了问题 2019-03-21

    【急急急】为什么我的网站忽然不能访问了???在阿里备案,服务器在阿里,解析也在阿里。

  • 提交了问题 2016-05-04

    ISV 创建套件,回调URL 解析eventType 老是返回 checkcreatesuiteurl

暂无更多信息
正在加载, 请稍后...
暂无更多信息
  • 提交了问题 2019-03-21

    【急急急】为什么我的网站忽然不能访问了???在阿里备案,服务器在阿里,解析也在阿里。

  • 提交了问题 2016-05-04

    ISV 创建套件,回调URL 解析eventType 老是返回 checkcreatesuiteurl

  • 回答了问题 2016-05-04

    ISV 创建套件,回调URL 解析eventType 老是返回 checkcreatesuiteurl

    ReISV 创建套件,回调URL 解析eventType 老是返回 checkcreatesuiteurl               #region 获取套件配置参数                 string mToken = ConfigurationManager.AppSettings['Token'];                 string mSuiteKey = '';                 string mEncodingAesKey = ConfigurationManager.AppSettings['EncodingAESKey'];                 mSuiteKey = 'suite4xxxxxxxxxxxxxxx';                 #endregion                 #region 获取回调URL里面的参数                 //url中的签名                 string msgSignature = context.Request['signature'];                 //url中的时间戳                 string timeStamp = context.Request['timestamp'];                 //url中的随机字符串                 string nonce = context.Request['nonce'];                 //post数据包数据中的加密数据                 string encryptStr = GetPostParam(context);                 #endregion                 Helper.WriteLog('post方法');                                string sEchoStr = '';                 #region 验证回调的url                 SuiteAuth suiteAuth = new SuiteAuth();                 Helper.WriteLog('mToken: ' + mToken);                 Helper.WriteLog('mEncodingAesKey: ' + mEncodingAesKey);                 Helper.WriteLog('msgSignature: ' + msgSignature);                 Helper.WriteLog('timeStamp: ' + timeStamp);                 Helper.WriteLog('nonce: ' + nonce);                 Helper.WriteLog('encryptStr: ' + encryptStr);                 var ret = suiteAuth.VerifyURL(mToken, mEncodingAesKey, msgSignature, timeStamp, nonce, encryptStr,                     ref mSuiteKey);                 if (ret != 0)                 {                     Helper.WriteLog('ERR: VerifyURL fail, ret: ' + ret);                     return;                 }                 #endregion                 #region                 //构造DingTalkCrypt                 DingTalkCrypt dingTalk = new DingTalkCrypt(mToken, mEncodingAesKey, mSuiteKey);                 string plainText = '';                 dingTalk.DecryptMsg(msgSignature, timeStamp, nonce, encryptStr, ref plainText);                 Hashtable tb = (Hashtable)JsonConvert.DeserializeObject(plainText, typeof(Hashtable));                 string eventType = tb['EventType'].ToString();                 string res = 'success';                 Helper.WriteLog('plainText:' + plainText);                 Helper.WriteLog('eventType:' + eventType);                 switch (eventType)-----------------------------------------------------------------------就是在这里,老是获取的是 check_create_suite_url                 {                                        case 'suite_ticket'://定时推送Ticket                         ConfigurationManager.AppSettings['SuiteTicket'] = tb['SuiteTicket'].ToString();                         mSuiteKey = tb['SuiteKey'].ToString();                         suiteAuth.SaveSuiteTicket(tb);                         break;                     case 'tmp_auth_code'://钉钉推送过来的临时授权码                         ConfigurationManager.AppSettings['TmpAuthCode'] = tb['AuthCode'].ToString();                         suiteAuth.SaveTmpAuthCode(tb);                         break;                     case 'change_auth':// do something;                         break;                     case 'check_update_suite_url':                         res = tb['Random'].ToString();                         mSuiteKey = tb['TestSuiteKey'].ToString();                         break;                 }                 timeStamp = Helper.GetTimeStamp().ToString();                 string encrypt = '';                 string signature = '';                 dingTalk = new DingTalkCrypt(mToken, mEncodingAesKey, mSuiteKey);                 dingTalk.EncryptMsg(res, timeStamp, nonce, ref encrypt, ref signature);                 Hashtable jsonMap = new Hashtable                 {                     {'msg_signature', signature},                     {'encrypt', encrypt},                     {'timeStamp', timeStamp},                     {'nonce', nonce}                 };                 string result = JsonConvert.SerializeObject(jsonMap);                 Helper.WriteLog('result: ' + result);                 context.Response.Write(result);
    踩0 评论0
正在加载, 请稍后...
滑动查看更多
正在加载, 请稍后...
暂无更多信息