diff --git a/user-access-service/zeus/user_access_service/app/views/account.py b/user-access-service/zeus/user_access_service/app/views/account.py index 1d132ade83aaa2e1ae61709b64e3b8e1db0f98e5..70f04160acc845c089516a1b5a6dd5d162813692 100644 --- a/user-access-service/zeus/user_access_service/app/views/account.py +++ b/user-access-service/zeus/user_access_service/app/views/account.py @@ -148,8 +148,10 @@ class RefreshToken(BaseResponse): refresh_res, refresh_data = callback.refresh_token(invaild_token) if refresh_res != state.SUCCEED: return self.response(code=refresh_res) - if RedisProxy.redis_connect.keys("token-" + refresh_data["username"] + "-*"): - RedisProxy.redis_connect.delete(*RedisProxy.redis_connect.keys("token-" + refresh_data["username"] + "-*")) + if RedisProxy.redis_connect.keys("token-" + refresh_data["username"] + "-" + configuration.client_id): + RedisProxy.redis_connect.delete( + *RedisProxy.redis_connect.keys("token-" + refresh_data["username"] + "-" + configuration.client_id) + ) # 20 minutes expire RedisProxy.redis_connect.set( "token-" + refresh_data["username"] + "-" + configuration.client_id, refresh_data["token"], 20 * 60