1
from zope.interface import Interface, Attribute
3
class ICredentialFactory(Interface):
4
scheme = Attribute("string indicated the authentication scheme this factory is associated with.")
6
def getChallenge(peer):
7
"""Generate a challenge the client may respond to.
9
@type peer: L{twisted.internet.interfaces.IAddress}
10
@param peer: The client's address
13
@return: dictionary of challenge arguments
16
def decode(response, request):
17
"""Create a credentials object from the given response.
18
May raise twisted.cred.error.LoginFailed if the response is invalid.
20
@type response: C{str}
21
@param response: scheme specific response string
23
@type request: L{twisted.web2.server.Request}
24
@param request: the request being processed