challengers Package

challengers Package

The ChallengerInterface class.

class tiddlyweb.web.challengers.ChallengerInterface

Bases: object

An interface for challenging users for login purposes. The chalenger basically does whatever it wants and _may_ result in doing something to a response that causes the user’s next request to pass an extractor.

Though there is no requirement for there to be a one to one correspondence between a Challenger and an Extractor, it will often be the case that a Challenger will need a particular Extractor in order to be effective.

A Challenger needs to take a WSGI request through to completion.

challenge_get(environ, start_response)

Respond to a GET request.

challenge_post(environ, start_response)

Respond to a POST request.

cookie_form Module

Present or validate a form for getting a username and password.

class tiddlyweb.web.challengers.cookie_form.Challenger

Bases: tiddlyweb.web.challengers.ChallengerInterface

A simple challenger that asks the user, by form, for their username and password and validates it against the user database. If it is good, a cookie is sent to the client which is later used by the simple_cookie credentials extractor.

challenge_get(environ, start_response)

Respond to a GET request by sending a form.

challenge_post(environ, start_response)

Respond to a POST by processing data sent from a form. The form should include a username and password. If it does not, send the form aagain. If it does, validate the data.

desc = 'TiddlyWeb username and password'

Table Of Contents

Previous topic

handler Package

Next topic

extractors Package

This Page