git://git.onelab.eu
/
plcapi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- if a node has no nodenetworks, make the first one added primary
[plcapi.git]
/
PLC
/
Methods
/
AuthCheck.py
diff --git
a/PLC/Methods/AuthCheck.py
b/PLC/Methods/AuthCheck.py
index
3a697ee
..
88b57ae
100644
(file)
--- a/
PLC/Methods/AuthCheck.py
+++ b/
PLC/Methods/AuthCheck.py
@@
-1,15
+1,15
@@
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-from PLC.Auth import
Password
Auth
+from PLC.Auth import
Auth, Boot
Auth
class AuthCheck(Method):
"""
class AuthCheck(Method):
"""
- Returns 1 if the user authenticated successfully, faults
+ Returns 1 if the user
or node
authenticated successfully, faults
otherwise.
"""
otherwise.
"""
- roles = ['admin', 'pi', 'user', 'tech']
- accepts = [
PasswordAuth(
)]
+ roles = ['admin', 'pi', 'user', 'tech'
, 'node'
]
+ accepts = [
Mixed(Auth(), BootAuth()
)]
returns = Parameter(int, '1 if successful')
def call(self, auth):
returns = Parameter(int, '1 if successful')
def call(self, auth):