From 8040085bd5b68a8ccb144054c4afe577bb91d691 Mon Sep 17 00:00:00 2001 From: Jamie Lennox Date: Thu, 27 Feb 2014 12:32:50 +1000 Subject: [PATCH] Fix passing get_token kwargs to get_access get_token takes kwargs so that a different plugin implementation might make use of them. It is not expected that token arguments would be passed to the code that is doing the token fetching. Change-Id: I28aa2b8070feec76f225601069c92c535334f4d4 --- keystoneclient/auth/identity/base.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/keystoneclient/auth/identity/base.py b/keystoneclient/auth/identity/base.py index 0b8314f2f..4020a2e9a 100644 --- a/keystoneclient/auth/identity/base.py +++ b/keystoneclient/auth/identity/base.py @@ -66,20 +66,19 @@ class BaseIdentityPlugin(base.BaseAuthPlugin): def get_token(self, session, **kwargs): """Return a valid auth token. - If a valid token is not present then a new one will be fetched using - the session and kwargs. + If a valid token is not present then a new one will be fetched. :raises HTTPError: An error from an invalid HTTP response. :return string: A valid token. """ - return self.get_access(session, **kwargs).auth_token + return self.get_access(session).auth_token def get_access(self, session, **kwargs): """Fetch or return a current AccessInfo object. - If a valid AccessInfo is present then it is returned otherwise kwargs - and session are used to fetch a new one. + If a valid AccessInfo is present then it is returned otherwise a new + one will be fetched. :raises HTTPError: An error from an invalid HTTP response. @@ -87,6 +86,6 @@ class BaseIdentityPlugin(base.BaseAuthPlugin): """ if (not self.auth_ref or self.auth_ref.will_expire_soon(self.MIN_TOKEN_LIFE_SECONDS)): - self.auth_ref = self.get_auth_ref(session, **kwargs) + self.auth_ref = self.get_auth_ref(session) return self.auth_ref