From 01231bbc6e5194b7dcc3f7730c94564b8e8fdcd8 Mon Sep 17 00:00:00 2001 From: Brant Knudson Date: Mon, 5 May 2014 17:09:23 -0500 Subject: Cached tokens aren't expired The auth_token test said that the cached tokens are expired. The tokens weren't expired, so remove the code. Change-Id: I8ce30cc09ee9bbc19cc4ebdb5d935a80d2d5d473 --- keystoneclient/middleware/auth_token.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'keystoneclient/middleware') diff --git a/keystoneclient/middleware/auth_token.py b/keystoneclient/middleware/auth_token.py index 637b3b2..72575a8 100644 --- a/keystoneclient/middleware/auth_token.py +++ b/keystoneclient/middleware/auth_token.py @@ -972,7 +972,7 @@ class AuthProtocol(object): env_key = self._header_to_env_var(key) return env.get(env_key, default) - def _cache_get(self, token_id, ignore_expires=False): + def _cache_get(self, token_id): """Return token information from cache. If token is invalid raise InvalidUserToken @@ -1035,7 +1035,7 @@ class AuthProtocol(object): expires = timeutils.normalize_time(expires) utcnow = timeutils.utcnow() - if ignore_expires or utcnow < expires: + if utcnow < expires: self.LOG.debug('Returning cached token') return data else: -- cgit v1.2.1