Go to the latest version of this document.

# ``twisted`.`spread`.`pb`.`IUsernameMD5Password``

interface documentation

`class IUsernameMD5Password(ICredentials): (source)`

Known implementations: `twisted.spread.pb._PortalAuthChallenger`

View In Hierarchy

I encapsulate a username and a hashed password.

This credential is used for username/password over PB. CredentialCheckers which check this kind of credential must store the passwords in plaintext form or as a MD5 digest.

Method | `checkMD5Password` | Validate these credentials against the correct MD5 digest of the password.
Method | `checkPassword` | Validate these credentials against the correct password.
Instance Variable | `username` | The username associated with these credentials.

def checkMD5Password(password): (source)

Validate these credentials against the correct MD5 digest of the password.

Parameters
password:`str` | The correct MD5 digest of a password against which to check.

Returns
`bool` or `Deferred` | `True` if the credentials represented by this object match the given digest, `False` if they do not, or a `Deferred` which will be called back with one of these values.

def checkPassword(password): (source)

Validate these credentials against the correct password.

Parameters
password:`str` | The correct, plaintext password against which to check.

Returns
`bool` or `Deferred` | `True` if the credentials represented by this object match the given password, `False` if they do not, or a `Deferred` which will be called back with one of these values.

username: `str` or `Deferred` = (source)

The username associated with these credentials.