From: Daniel Hokka Zakrisson Date: Sat, 16 Oct 2010 22:39:31 +0000 (-0400) Subject: Fix auth extensibility. X-Git-Tag: plcapi-5.0-19~68 X-Git-Url: http://git.onelab.eu/?p=plcapi.git;a=commitdiff_plain;h=1efbb844f0f100f1bbca45fcc7d5168fb106953c Fix auth extensibility. --- diff --git a/PLC/Auth.py b/PLC/Auth.py index 80db3e7..0ef2942 100644 --- a/PLC/Auth.py +++ b/PLC/Auth.py @@ -26,14 +26,6 @@ from PLC.Sessions import Session, Sessions from PLC.Peers import Peer, Peers from PLC.Boot import notify_owners -auth_methods = {'session': SessionAuth, - 'password': PasswordAuth, - 'capability': PasswordAuth, - 'gpg': GPGAuth, - 'hmac': BootAuth, - 'hmac_dummybox': BootAuth, - 'anonymous': AnonymousAuth} - class Auth(Parameter): """ Base class for all API authentication methods, as well as a class @@ -339,6 +331,14 @@ class PasswordAuth(Auth): method.caller = person +auth_methods = {'session': SessionAuth, + 'password': PasswordAuth, + 'capability': PasswordAuth, + 'gpg': GPGAuth, + 'hmac': BootAuth, + 'hmac_dummybox': BootAuth, + 'anonymous': AnonymousAuth} + path = os.path.dirname(__file__) + "/Auth.d" try: extensions = os.listdir(path)