Go to the latest version of this document.

# ``twisted`.`cred`.`credentials`.`UsernameHashedPassword``

class documentation

`class UsernameHashedPassword: (source)`

Constructor: `UsernameHashedPassword(username, hashed)`

Implements interfaces: `twisted.cred.credentials.IUsernameHashedPassword`

View In Hierarchy

Undocumented

Method | `__init__` | IUsernameHashedPassword does not have any particular requirement upon its constructor.
Method | `checkPassword` | Validate these credentials against the correct password.
Instance Variable | `hashed` | Undocumented
Instance Variable | `username` | The username associated with these credentials.

def __init__(self, username, hashed): (source)
from `twisted.cred.credentials.IUsernameHashedPassword`

IUsernameHashedPassword does not have any particular requirement upon its constructor.

def checkPassword(self, password): (source)
from `twisted.cred.credentials.IUsernameHashedPassword`

Validate these credentials against the correct password.

Parameters
password:`bytes` | 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.

hashed = (source)

Undocumented

username = (source)
from `twisted.cred.credentials.IUsernameHashedPassword`

The username associated with these credentials.