From 0aef4568db64d37dec6a08f49b076e763c8ad015 Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Mon, 9 Oct 2006 17:52:55 +0000 Subject: [PATCH] - removed 'Adm' prefix --- PLC/Methods/AuthCheck.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 PLC/Methods/AuthCheck.py diff --git a/PLC/Methods/AuthCheck.py b/PLC/Methods/AuthCheck.py new file mode 100644 index 00000000..3a697eef --- /dev/null +++ b/PLC/Methods/AuthCheck.py @@ -0,0 +1,16 @@ +from PLC.Method import Method +from PLC.Parameter import Parameter, Mixed +from PLC.Auth import PasswordAuth + +class AuthCheck(Method): + """ + Returns 1 if the user authenticated successfully, faults + otherwise. + """ + + roles = ['admin', 'pi', 'user', 'tech'] + accepts = [PasswordAuth()] + returns = Parameter(int, '1 if successful') + + def call(self, auth): + return 1 -- 2.47.0