- change calling convention for Add slightly; if the Add function for
[plcapi.git] / PLC / Methods / AuthCheck.py
index 3a697ee..09b2f9b 100644 (file)
@@ -1,15 +1,15 @@
 from PLC.Method import Method
 from PLC.Parameter import Parameter, Mixed
-from PLC.Auth import PasswordAuth
+from PLC.Auth import PasswordAuth, 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()]
+    accepts = [Mixed(PasswordAuth(), BootAuth())]
     returns = Parameter(int, '1 if successful')
 
     def call(self, auth):