Package twisted :: Package web :: Module guard :: Class AuthForm

[show private | hide private]
[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)`
| ``display`(self, request)` Display the form. (inherited from `Form`)
| ``format`(self, form, write, request)` I display an HTML FORM according to the result of self.getFormFields. (inherited from `Form`)
| ``formatError`(self, error)` Format an error message. (inherited from `Form`)
| ``getFormFields`(self, request, fieldSet)` I return a list of lists describing this form, or a Deferred. (inherited from `Form`)
| ``getFormID`(self)` Override me: I disambiguate between multiple forms of the same type. (inherited from `Form`)
| `getTitle(self, request)` (inherited from `Widget`)
| `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.
| `shouldProcess(self, request)` (inherited from `Form`)
| ``tryAgain`(self, err, req)` Utility method for re-drawing the form with an error message. (inherited from `Form`)
| `_displayFormat(self, request, form)` (inherited from `Form`)
| `_displayProcess(self, request, form)` (inherited from `Form`)
| ``_doProcess`(self, form, write, request)` (internal) Prepare arguments for self.process. (inherited from `Form`)

Class Variable Summary
`int` | `formAcceptExtraArgs`
`list` | `formFields`

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.

Class Variable Details

### formAcceptExtraArgs

  Type:
    `int`
  Value:

        1

### formFields

  Type:
    `list`
  Value:

        [['string', 'Identity', 'username', ''],
         ['password', 'Password', 'password', ''],
         ['string', 'Perspective', 'perspective', '']]

Generated by Epydoc 1.1 on Sat Feb 15 21:19:28 2003 | http://epydoc.sf.net