diff --git a/tests/tasks/api/refresh_token.py b/tests/tasks/api/refresh_token.py index ee228d6e53..305c4f9bef 100755 --- a/tests/tasks/api/refresh_token.py +++ b/tests/tasks/api/refresh_token.py @@ -16,16 +16,11 @@ access_token = jwt.decode(grant['access_token'], verify=False) -current_time = int(time.time()) - -if current_time < access_token['exp']: - print grant_raw -else: - data = {'client_id': 'auth-server', - 'client_secret': auth_server_client_secret, - 'grant_type': 'refresh_token', - 'refresh_token': grant['refresh_token']} - - r = requests.post(url = "http://keycloak:8080/auth/realms/lagoon/protocol/openid-connect/token", data = data) - print r.text +data = {'client_id': 'auth-server', + 'client_secret': auth_server_client_secret, + 'grant_type': 'refresh_token', + 'refresh_token': grant['refresh_token']} + +r = requests.post(url = "http://keycloak:8080/auth/realms/lagoon/protocol/openid-connect/token", data = data) +print r.text