git://git.onelab.eu
/
plcapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
78ad335
)
Fix auth extensibility.
author
Daniel Hokka Zakrisson
<dhokka@cs.princeton.edu>
Sat, 16 Oct 2010 22:39:31 +0000
(18:39 -0400)
committer
Daniel Hokka Zakrisson
<dhokka@cs.princeton.edu>
Sat, 16 Oct 2010 22:39:31 +0000
(18:39 -0400)
PLC/Auth.py
patch
|
blob
|
history
diff --git
a/PLC/Auth.py
b/PLC/Auth.py
index
80db3e7
..
0ef2942
100644
(file)
--- 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
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
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
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)
path = os.path.dirname(__file__) + "/Auth.d"
try:
extensions = os.listdir(path)