From c9447dbab21b41c8425daef6bfd7f20c156a845e Mon Sep 17 00:00:00 2001 From: Matthew Edmonds Date: Thu, 17 Sep 2015 22:40:50 -0400 Subject: [PATCH] Cleanup a few auth_token comments It is not only memcached cases where revocations need to be checked, so this cleans up an old comment that was no longer giving the full picture on that. It also corrects a couple other nit grammatical issues for better clarity. Change-Id: I51e51d2127c79b11b206e1459f3e83957bf44128 --- keystonemiddleware/auth_token/__init__.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/keystonemiddleware/auth_token/__init__.py b/keystonemiddleware/auth_token/__init__.py index d09f91b6..8987e0ea 100644 --- a/keystonemiddleware/auth_token/__init__.py +++ b/keystonemiddleware/auth_token/__init__.py @@ -511,7 +511,7 @@ class _BaseAuthProtocol(object): :raises exc.InvalidToken: if token is rejected """ - # 0 seconds of validity means is it valid right now. + # 0 seconds of validity means it is invalid right now if auth_ref.will_expire_soon(stale_duration=0): raise exc.InvalidToken(_('Token authorization failed')) @@ -838,9 +838,8 @@ class AuthProtocol(_BaseAuthProtocol): data = cached if self._check_revocations_for_cached: - # A token stored in Memcached might have been revoked - # regardless of initial mechanism used to validate it, - # and needs to be checked. + # A token might have been revoked, regardless of initial + # mechanism used to validate it, and needs to be checked. self._revocations.check(token_hashes) else: data = self._validate_offline(token, token_hashes)