## Long messages for reasons why one might have been redirected back to the
## login page.
LOGIN_REASONS = {
- 'AUTHFAIL': 'incorrect user name or password',
- 'NOAUTH': 'not authenticated',
- 'NONONCE': 'missing nonce',
- 'BADTOKEN': 'malformed token',
- 'BADTIME': 'invalid timestamp',
- 'BADNONCE': 'nonce mismatch',
- 'EXPIRED': 'session timed out',
- 'BADTAG': 'incorrect tag',
- 'NOUSER': 'unknown user name',
- 'LOGOUT': 'explicitly logged out',
+ 'AUTHFAIL': 'Incorrect user name or password',
+ 'NOAUTH': 'Not authenticated',
+ 'NONONCE': 'Missing nonce',
+ 'BADTOKEN': 'Malformed token',
+ 'BADTIME': 'Invalid timestamp',
+ 'BADNONCE': 'Nonce mismatch',
+ 'EXPIRED': 'Session timed out',
+ 'BADTAG': 'Incorrect tag',
+ 'NOUSER': 'Unknown user name',
+ 'LOGOUT': 'Explicitly logged out',
None: None
}
@CGI.subcommand(
'auth', ['cgi-noauth'],
'Verify a user name and password',
+ methods = ['POST'],
params = [SC.Arg('u'), SC.Arg('pw')])
def cmd_auth(u, pw):
svc = S.SERVICES['master']