svn keywords
[plcapi.git] / PLC / Methods / AuthCheck.py
1 # $Id$
2 # $URL$
3 from PLC.Method import Method
4 from PLC.Parameter import Parameter, Mixed
5 from PLC.Auth import Auth, BootAuth
6
7 class AuthCheck(Method):
8     """
9     Returns 1 if the user or node authenticated successfully, faults
10     otherwise.
11     """
12
13     roles = ['admin', 'pi', 'user', 'tech', 'node']
14     accepts = [Auth()]
15     returns = Parameter(int, '1 if successful')
16
17     def call(self, auth):
18         return 1