interface documentation

class IUsernamePassword(ICredentials): (source)

Known implementations: twisted.cred.credentials.UsernamePassword

View In Hierarchy

I encapsulate a username and a plaintext password.

This encapsulates the case where the password received over the network has been hashed with the identity function (That is, not at all). The CredentialsChecker may store the password in whatever format it desires, it need only transform the stored password in a similar way before performing the comparison.

Method checkPassword Validate these credentials against the correct password.
Instance Variable password The password associated with these credentials.
Instance Variable username The username associated with these credentials.
def checkPassword(password: bytes) -> bool: (source)

Validate these credentials against the correct password.

Parameters
password:bytesThe correct, plaintext password against which to check.
Returns
bool or DeferredTrue 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.

The password associated with these credentials.

The username associated with these credentials.