From 1efbb844f0f100f1bbca45fcc7d5168fb106953c Mon Sep 17 00:00:00 2001 From: Daniel Hokka Zakrisson Date: Sat, 16 Oct 2010 18:39:31 -0400 Subject: [PATCH 1/1] Fix auth extensibility. --- PLC/Auth.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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) -- 2.43.0