1.工单新增rfid字段
2.修改中控对接的工单接口 3.快速订单材料,型号,客户修改为可选择
This commit is contained in:
@@ -21,6 +21,7 @@ class Http(models.AbstractModel):
|
||||
def _auth_method_sf_token(cls):
|
||||
# 从headers.environ中获取对方传过来的token,timestamp,加密的校验字符串
|
||||
datas = request.httprequest.headers.environ
|
||||
logging.info(datas)
|
||||
if 'HTTP_TOKEN' in datas:
|
||||
_logger.info('token:%s' % datas['HTTP_TOKEN'])
|
||||
# 查询密钥
|
||||
@@ -40,6 +41,7 @@ class Http(models.AbstractModel):
|
||||
raise AuthenticationError('请求已过期')
|
||||
check_str = '%s%s%s' % (datas['HTTP_TOKEN'], post_time, factory_secret.sf_secret_key)
|
||||
check_sf_str = hashlib.sha1(check_str.encode('utf-8')).hexdigest()
|
||||
_logger.info('check_str:%s' % check_sf_str)
|
||||
if check_sf_str != datas['HTTP_CHECKSTR']:
|
||||
raise AuthenticationError('数据校验不通过')
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user