X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FAuth.py;fp=PLC%2FAuth.py;h=0ef2942912e608fa27fca69e0278c3ce19ee90e6;hb=1efbb844f0f100f1bbca45fcc7d5168fb106953c;hp=80db3e792c94aabb067c2ac4fe7f8f3a42d4b3c5;hpb=78ad33547002eca8451ca0698e52f40139191412;p=plcapi.git 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)