class documentation

class twisted.conch.checkers.SSHProtocolChecker: (source)

Implements interfaces: twisted.cred.checkers.ICredentialsChecker

View In Hierarchy

SSHProtocolChecker is a checker that requires multiple authentications to succeed. To add a checker, call my registerChecker method with the checker and the interface.

After each successful authenticate, I call my areDone method with the avatar id. To get a list of the successful credentials for an avatar id, use SSHProcotolChecker.successfulCredentials[avatarId]. If areDone returns True, the authentication has succeeded.

Method __init__ Undocumented
Instance Variable checkers Undocumented
Instance Variable successfulCredentials Undocumented
Property credentialInterfaces A list of sub-interfaces of ICredentials which specifies which I may check.
Method registerChecker Undocumented
Method requestAvatarId No summary
Method areDone Override to determine if the authentication is finished for a given avatarId.
Method _cbGoodAuthentication No summary
def __init__(self): (source)

Undocumented

checkers = (source)

Undocumented

(type: dict)
successfulCredentials = (source)

Undocumented

(type: dict)
@property
credentialInterfaces = (source)

A list of sub-interfaces of ICredentials which specifies which I may check.

def registerChecker(self, checker, *credentialInterfaces): (source)

Undocumented

def requestAvatarId(self, credentials): (source)

Part of the ICredentialsChecker interface. Called by a portal with some credentials to check if they'll authenticate a user. We check the interfaces that the credentials provide against our list of acceptable checkers. If one of them matches, we ask that checker to verify the credentials. If they're valid, we call our _cbGoodAuthentication method to continue.

Parameterscredentialsthe credentials the Portal wants us to verify
def _cbGoodAuthentication(self, avatarId, credentials): (source)

Called if a checker has verified the credentials. We call our areDone method to see if the whole of the successful authentications are enough. If they are, we return the avatar ID returned by the first checker.

def areDone(self, avatarId): (source)

Override to determine if the authentication is finished for a given avatarId.

ParametersavatarIdthe avatar returned by the first checker. For this checker to function correctly, all the checkers must return the same avatar ID.
API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.