X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FAuthCheck.py;h=88b57aeaea879a2893ee4b20fac8e9b98cfe4ed9;hb=c1a0a8e278d2201e980d44efbbb498dd12fd70d3;hp=3a697eef1d2e6610069934521769aa35b408070a;hpb=0aef4568db64d37dec6a08f49b076e763c8ad015;p=plcapi.git diff --git a/PLC/Methods/AuthCheck.py b/PLC/Methods/AuthCheck.py index 3a697ee..88b57ae 100644 --- 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.Auth import PasswordAuth +from PLC.Auth import Auth, BootAuth class AuthCheck(Method): """ - Returns 1 if the user authenticated successfully, faults + Returns 1 if the user or node authenticated successfully, faults 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):