Implements interfaces: twisted.cred.checkers.ICredentialsChecker

A credentials checker for a UNIX server. This will check that an authenticating username/password is a valid user on the system.

Does not work on Windows.

Right now this supports Python's pwd and spwd modules, if they are installed. It does not support PAM.

Class Variable credentialInterfaces Undocumented
Method checkPwd Obtain the encrypted password for username from the Unix password database using pwd.getpwnam, and see if it it matches it matches password.
Method checkSpwd Obtain the encrypted password for username from the Unix shadow password database using spwd.getspnam, and see if it it matches it matches password.
Method requestAvatarId Validate credentials and produce an avatar ID.
credentialInterfaces =
Undocumented
def checkPwd(self, pwd, username, password): (source)

Obtain the encrypted password for username from the Unix password database using pwd.getpwnam, and see if it it matches it matches password.

ParameterspwdModule which provides functions which access to the Unix password database. (type: module)
usernameThe user to look up in the Unix password database. (type: unicode/str or bytes)
passwordThe password to compare.
def checkSpwd(self, spwd, username, password): (source)

Obtain the encrypted password for username from the Unix shadow password database using spwd.getspnam, and see if it it matches it matches password.

ParametersspwdModule which provides functions which access to the Unix shadow password database.
usernameThe user to look up in the Unix password database. (type: unicode/str or bytes)
passwordThe password to compare.
def requestAvatarId(self, credentials): (source)

Validate credentials and produce an avatar ID.

Parameterscredentialssomething which implements one of the interfaces in credentialInterfaces.
Returnsa Deferred which will fire with a bytes that identifies an avatar, an empty tuple to specify an authenticated anonymous user (provided as twisted.cred.checkers.ANONYMOUS) or fail with UnauthorizedLogin. Alternatively, return the result itself.
See Alsotwisted.cred.credentials
API Documentation for Twisted, generated by pydoctor at 2020-03-20 23:54:06.