twisted.cred.checkers.FilePasswordDB

Package twisted :: Package cred :: Module checkers :: Class FilePasswordDB |
[frames | no frames]

## Class FilePasswordDB

A file-based, text-based username/password database.

Records in the datafile for this class are delimited by a particular string. The username appears in a fixed field of the columns delimited by this string, as does the password. Both fields are specifiable. If the passwords are not stored plaintext, a hash function must be supplied to convert plaintext passwords to the form stored on disk and this CredentialsChecker will only be able to check IUsernamePassword credentials. If the passwords are stored plaintext, IUsernameHashedPassword credentials will be checkable as well.

Method Summary
| ``__init__`(self, filename, delim, usernameField, passwordField, caseSensitive, hash)`
| `_cbPasswordMatch(self, matched, username)`
| `getUser(self, username)`
| `requestAvatarId(self, c)`

Class Variable Summary
`tuple` | `__implements__` = `(<class twisted.cred.checkers.ICredenti...`

Method Details

### __init__(self, filename, delim=':', usernameField=0, passwordField=1, caseSensitive=1, hash=None) (Constructor) Parameters: `filename` - The name of the file from which to read username and password information. (type=`str`) `delim` - The field delimiter used in the file. (type=`str`) `usernameField` - The index of the username after splitting a line on the delimiter. (type=`int`) `passwordField` - The index of the password after splitting a line on the delimiter. (type=`int`) `caseSensitive` - If true, consider the case of the username when performing a lookup. Ignore it otherwise. (type=`bool`) `hash` - A function used to transform the plaintext password received over the network to a format suitable for comparison against the version stored on disk. The arguments to the callable are the username, the network-supplied password, and the in-file version of the password. (type=Three-argument callable.)

Class Variable Details

    ### __implements__ Type: `tuple` Value:
        (<class twisted.cred.checkers.ICredentialsChecker at 0x85adbcc>,)

Generated by Epydoc 2.0 on Sat May 15 20:07:44 2004 | http://epydoc.sf.net