|
@@ -35,6 +35,7 @@ class TokenObject:
|
|
|
self.lang = res.get('lang', None)
|
|
|
self.user = res.get('user', '')
|
|
|
app_bundle_id = res.get('appBundleId', None)
|
|
|
+ token_version = res.get('tokenVersion', None)
|
|
|
# 刷新登录时间
|
|
|
# if self.userID:
|
|
|
# print(self.user)
|
|
@@ -53,7 +54,7 @@ class TokenObject:
|
|
|
return
|
|
|
else:
|
|
|
if self.userID:
|
|
|
- if app_bundle_id:
|
|
|
+ if app_bundle_id and token_version == 'V2':
|
|
|
redis_obj = RedisObject()
|
|
|
key = 'token_user_{}_{}'.format(self.userID, app_bundle_id)
|
|
|
redis_token = redis_obj.get_data(key)
|
|
@@ -108,7 +109,8 @@ class TokenObject:
|
|
|
'refresh_token': refresh_token,
|
|
|
}
|
|
|
app_bundle_id = data.get('appBundleId', None)
|
|
|
- if app_bundle_id:
|
|
|
+ token_version = data.get('tokenVersion', None)
|
|
|
+ if app_bundle_id and token_version == 'V2':
|
|
|
redis_obj = RedisObject()
|
|
|
key = 'token_user_{}_{}'.format(data['userID'], app_bundle_id)
|
|
|
LOGGER.info('写入新token:{}'.format(access_token))
|