t.w.a.i.ICredentialFactory(Interface) : interface documentation

Part of twisted.web2.auth.interfaces View Source View In Hierarchy

Known implementations: twisted.web2.auth.basic.BasicCredentialFactory, twisted.web2.auth.digest.DigestCredentialFactory

A credential factory provides state between stages in HTTP authentication. It is ultimately in charge of creating an ICredential for the specified scheme, that will be used by cred to complete authentication.
Attribute scheme string indicating the authentication scheme this factory is associated with.
Method getChallenge Generate a challenge the client may respond to.
Method decode Create a credentials object from the given response. May raise twisted.cred.error.LoginFailed if the response is invalid.
scheme =
string indicating the authentication scheme this factory is associated with.
def getChallenge(peer): (source)
Generate a challenge the client may respond to.
ParameterspeerThe client's address (type: twisted.internet.interfaces.IAddress )
Returnsdictionary of challenge arguments (type: dict )
def decode(response, request): (source)
Create a credentials object from the given response. May raise twisted.cred.error.LoginFailed if the response is invalid.
Parametersresponsescheme specific response string (type: str )
requestthe request being processed (type: twisted.web2.server.Request )
ReturnsICredentials
API Documentation for Twisted, generated by pydoctor at 2011-10-27 15:57:47.