Package WebStack :: Package Resources :: Module Login :: Class LoginAuthenticator
[show private | hide private]
[frames | no frames]

Class LoginAuthenticator


Method Summary
  __init__(self, secret_key, credentials, cookie_name)
Initialise the authenticator with a 'secret_key', the authenticator's registry of 'credentials' and an optional 'cookie_name'.
  authenticate(self, trans, username, password)
Authenticate the sender of the transaction 'trans', returning 1 (true) if they are recognised, 0 (false) otherwise.
  set_token(self, trans, username)
Set an authentication token in 'trans' with the given 'username'.

Method Details

__init__(self, secret_key, credentials, cookie_name=None)
(Constructor)

Initialise the authenticator with a 'secret_key', the authenticator's registry of
'credentials' and an optional 'cookie_name'.

The 'credentials' must be an object which supports tests of the form
'(username, password) in credentials'.

authenticate(self, trans, username, password)

Authenticate the sender of the transaction 'trans', returning 1 (true) if they are
recognised, 0 (false) otherwise. Use the 'username' and 'password' supplied as
credentials.

set_token(self, trans, username)

Set an authentication token in 'trans' with the given 'username'.

Generated by Epydoc 2.1 on Thu Mar 1 00:37:14 2007 http://epydoc.sf.net