chenjunkai 5 年之前
父節點
當前提交
356a53ba71
共有 2 個文件被更改,包括 7 次插入4 次删除
  1. 1 0
      Controller/DetectController.py
  2. 6 4
      Controller/ShadowController.py

+ 1 - 0
Controller/DetectController.py

@@ -32,6 +32,7 @@ from Service.CommonService import CommonService
 
 
 # http://test.dvema.com/notify/push?uidToken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJQMldOR0pSRDJFSEE1RVU5MTExQSJ9.xOCI5lerk8JOs5OcAzunrKCfCrtuPIZ3AnkMmnd-bPY&n_time=1526845794&channel=1&event_type=51&is_st=0
+# http://test.dvema.com/notify/push?etk=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJQMldOR0pSRDJFSEE1RVU5MTExQSJ9.xOCI5lerk8JOs5OcAzunrKCfCrtuPIZ3AnkMmnd-bPY&n_time=1526845794&channel=1&event_type=51&is_st=0
 
 
 # 移动侦测接口

+ 6 - 4
Controller/ShadowController.py

@@ -38,10 +38,12 @@ def generate_utk(request):
     uid = request_dict.get('uid',None)
     if username and password:
         if username == 'debug_user' and password == 'debug_password':
-            utko = UidTokenObject()
-            # right
-            utko.generate(data={'uid': uid})
-            return response.json(0, {'uidToken': utko.token})
+            # utko = UidTokenObject()
+            # # right
+            # utko.generate(data={'uid': uid})
+            etkObj = ETkObject(etk='')
+            etk = etkObj.encrypt(uid)
+            return response.json(0, {'etk': etk})
         else:
             return response.json(404)
     else: