twisted.web.guard.AuthForm

Package twisted :: Package web :: Module guard :: Class AuthForm |
[frames | no frames]

## Class AuthForm

    Widget --+
             |
          Form --+
                 |
                AuthForm

Method Summary
| ``__init__`(self, reqauth, sessionIdentity, sessionPerspective)` Initialize, specifying various options.
| `didntGetIdentity(self, unauth, request)`
| `didntGetPerspective(self, error, request)`
| `gotIdentity(self, ident, password, request, perspectiveName)`
| `gotPerspective(self, perspective, request, ident)`
| `passwordIsOk(self, msg, ident, password, request, perspectiveName)`
| ``process`(self, write, request, submit, username, password, perspective)` Process the form results.
Inherited from Form
| ``_displayFormat`(self, request, form)`
| ``_displayProcess`(self, request, form)`
| ``_doProcess`(self, form, write, request)` (internal) Prepare arguments for self.process.
| ``display`(self, request)` Display the form.
| ``format`(self, form, write, request)` I display an HTML FORM according to the result of self.getFormFields.
| ``formatError`(self, error)` Format an error message.
| ``getFormFields`(self, request, fieldSet)` I return a list of lists describing this form, or a Deferred.
| ``getFormID`(self)` Override me: I disambiguate between multiple forms of the same type.
| ``shouldProcess`(self, request)`
| ``tryAgain`(self, err, req)` Utility method for re-drawing the form with an error message.
Inherited from Widget
| ``getTitle`(self, request)`

Class Variable Summary
`int` | `formAcceptExtraArgs` = 1
`list` | `formFields` = `[['string', 'Identity', 'username', ''], ['...`
Inherited from Form
`str` | `actionURI` = `''`
`dict` | `formGen` = `{'checkbox': <function htmlFor_checkbox at 0x8...`
`dict` | `formParse` = `{'int': <type 'int'>, 'float': <type 'float'...`
`list` | `submitNames` = `['Submit']`
Inherited from Widget
`NoneType` | `title` = None

Method Details

### __init__(self, reqauth, sessionIdentity=None, sessionPerspective=None) (Constructor) Initialize, specifying various options. Parameters: `reqauth` - a web.resource.Resource instance, indicating which resource a user will be logging into with this form; this must specify a serviceName attribute which indicates the name of the service from which perspectives will be requested. `sessionIdentity` - if specified, the name of the attribute on the user's session to set for the identity they get from logging in to this form. `sessionPerspective` - if specified, the name of the attribute on the user's session to set for the perspective they get from logging in to this form.

### process(self, write, request, submit, username, password, perspective) Process the form results. Overrides: `twisted.web.widgets.Form.process`

Class Variable Details

    ### formAcceptExtraArgs Type: `int` Value:
        1

    ### formFields Type: `list` Value:
        [['string', 'Identity', 'username', ''],
         ['password', 'Password', 'password', ''],
         ['string', 'Perspective', 'perspective', '']]

Generated by Epydoc 2.0 on Sat May 15 20:07:43 2004 | http://epydoc.sf.net