summaryrefslogtreecommitdiff
path: root/keystoneclient/middleware
diff options
context:
space:
mode:
authorBrant Knudson <bknudson@us.ibm.com>2014-05-05 17:09:23 -0500
committerBrant Knudson <bknudson@us.ibm.com>2014-05-05 17:09:23 -0500
commit01231bbc6e5194b7dcc3f7730c94564b8e8fdcd8 (patch)
treefbb96d0ab8d51d65c6a8a9ff8fe1aa67a503e9a7 /keystoneclient/middleware
parent04c525560fc0aab9f452c6692b4baed443f3fa3b (diff)
downloadpython-keystoneclient-01231bbc6e5194b7dcc3f7730c94564b8e8fdcd8.tar.gz
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
Diffstat (limited to 'keystoneclient/middleware')
-rw-r--r--keystoneclient/middleware/auth_token.py4
1 files changed, 2 insertions, 2 deletions
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: