diff options
author | Brant Knudson <bknudson@us.ibm.com> | 2013-07-17 17:46:28 -0500 |
---|---|---|
committer | Brant Knudson <bknudson@us.ibm.com> | 2013-07-17 17:53:15 -0500 |
commit | 72a44843ee5856ac8896a428ec9fd475734a3188 (patch) | |
tree | 3a49accaffa4dbc71dbb9659c01620863386bc12 | |
parent | c42533fc00210a16d6eb74909adaeddb9bc4fbf6 (diff) | |
download | keystone-72a44843ee5856ac8896a428ec9fd475734a3188.tar.gz keystone-72a44843ee5856ac8896a428ec9fd475734a3188.tar.xz keystone-72a44843ee5856ac8896a428ec9fd475734a3188.zip |
sql.Driver:authenticate() signatures should match
A method called authenticate_user was renamed in
identity.backends.sql.Driver from authenticate_user
to authenticate but the base class wasn't updated.
Also, the user_id and password arguments to authenticate
should NOT be optional.
Change-Id: Ie6eb42f060e368ec99d5d8241a404cf7c70d48ae
-rw-r--r-- | keystone/identity/backends/kvs.py | 2 | ||||
-rw-r--r-- | keystone/identity/backends/ldap.py | 2 | ||||
-rw-r--r-- | keystone/identity/backends/pam.py | 2 | ||||
-rw-r--r-- | keystone/identity/backends/sql.py | 2 | ||||
-rw-r--r-- | keystone/identity/core.py | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/keystone/identity/backends/kvs.py b/keystone/identity/backends/kvs.py index 83535108..0323d3d0 100644 --- a/keystone/identity/backends/kvs.py +++ b/keystone/identity/backends/kvs.py @@ -28,7 +28,7 @@ class Identity(kvs.Base, identity.Driver): return "keystone.assignment.backends.kvs.Assignment" # Public interface - def authenticate(self, user_id=None, password=None): + def authenticate(self, user_id, password): user_ref = None try: user_ref = self._get_user(user_id) diff --git a/keystone/identity/backends/ldap.py b/keystone/identity/backends/ldap.py index c06737c8..775ccf98 100644 --- a/keystone/identity/backends/ldap.py +++ b/keystone/identity/backends/ldap.py @@ -60,7 +60,7 @@ class Identity(identity.Driver): def get_project(self, project_id): return self.assignment.get_project(project_id) - def authenticate(self, user_id=None, password=None): + def authenticate(self, user_id, password): try: user_ref = self._get_user(user_id) except exception.UserNotFound: diff --git a/keystone/identity/backends/pam.py b/keystone/identity/backends/pam.py index 5cfa5b16..2a6ee621 100644 --- a/keystone/identity/backends/pam.py +++ b/keystone/identity/backends/pam.py @@ -58,7 +58,7 @@ class PamIdentity(identity.Driver): Tenant is always the same as User, root user has admin role. """ - def authenticate(self, user_id=None, password=None): + def authenticate(self, user_id, password): auth = pam.authenticate if pam else PAM_authenticate if not auth(user_id, password): raise AssertionError('Invalid user / password') diff --git a/keystone/identity/backends/sql.py b/keystone/identity/backends/sql.py index f82c34f8..d7679365 100644 --- a/keystone/identity/backends/sql.py +++ b/keystone/identity/backends/sql.py @@ -84,7 +84,7 @@ class Identity(sql.Base, identity.Driver): return utils.check_password(password, user_ref.password) # Identity interface - def authenticate(self, user_id=None, password=None): + def authenticate(self, user_id, password): session = self.get_session() user_ref = None try: diff --git a/keystone/identity/core.py b/keystone/identity/core.py index d04902ae..5914cae5 100644 --- a/keystone/identity/core.py +++ b/keystone/identity/core.py @@ -216,7 +216,7 @@ class Manager(manager.Manager): class Driver(object): """Interface description for an Identity driver.""" - def authenticate_user(self, user_id, password): + def authenticate(self, user_id, password): """Authenticate a given user and password. :returns: user_ref :raises: AssertionError |