Package twisted :: Package cred :: Module checkers :: Class ICredentialsChecker
[show private | hide private]
[frames | no frames]

Class ICredentialsChecker

NonMetaInterface --+
                   |
                  ICredentialsChecker


I check sub-interfaces of ICredentials.
Method Summary
  requestAvatarId(self, credentials)
Return a Deferred which will fire a string which identifies an avatar, an empty tuple to specify an authenticated anonymous user (provided as checkers.ANONYMOUS) or fire a Failure(UnauthorizedLogin).

Class Variable Summary
  credentialInterfaces - A list of sub-interfaces of ICredentials which specifies which I may check.

Method Details

requestAvatarId(self, credentials)

Parameters:
credentials - something which implements one of the interfaces in self.credentialInterfaces.
Returns:
a Deferred which will fire a string which identifies an avatar, an empty tuple to specify an authenticated anonymous user (provided as checkers.ANONYMOUS) or fire a Failure(UnauthorizedLogin). A note on anonymity - We do not want None as the value for anonymous because it is too easy to accidentally return it. We do not want the empty string, because it is too easy to mistype a password file. For example, an .htpasswd file may contain the lines: ['hello:asdf', 'world:asdf', 'goodbye', ':world']. This misconfiguration will have an ill effect in any case, but accidentally granting anonymous access is a worse failure mode than simply granting access to an untypeable username. We do not want an instance of 'object', because that would create potential problems with persistence.

Class Variable Details

credentialInterfaces

A list of sub-interfaces of ICredentials which specifies which I may check.

Generated by Epydoc 1.1 on Fri Jun 27 03:47:48 2003 http://epydoc.sf.net