Package WebStack :: Package Resources :: Module LoginRedirect :: Class LoginRedirectResource
[show private | hide private]
[frames | no frames]

Class LoginRedirectResource


A resource redirecting to a login URL.
Method Summary
  __init__(self, login_url, app_url, resource, authenticator, anonymous_parameter_name, anonymous_username, logout_parameter_name, logout_url, use_logout_redirect, urlencoding)
Initialise the resource with a 'login_url', an 'app_url' where the 'resource' for the application being protected should be reachable, and an 'authenticator'.
  respond(self, trans)
Respond using the given transaction 'trans'.
  _show_logout(self, trans, redirect)
Write a confirmation page to 'trans' containing the 'redirect' URL which the client should be sent to upon logout.

Class Variable Summary
str encoding = 'utf-8'

Method Details

__init__(self, login_url, app_url, resource, authenticator, anonymous_parameter_name=None, anonymous_username='anonymous', logout_parameter_name=None, logout_url='/', use_logout_redirect=1, urlencoding=None)
(Constructor)

Initialise the resource with a 'login_url', an 'app_url' where the 'resource' for the application being protected should be reachable, and an 'authenticator'.

If the optional 'anonymous_parameter_name' is set, clients providing a parameter of that name in the URL will not be authenticated, but then such clients will get a predefined user identity associated with them, configurable using the optional 'anonymous_username'.

If the optional 'logout_parameter_name' is set, clients providing a parameter of that name in the URL will become logged out. After logging out, clients are redirected to a location which can be configured by the optional 'logout_url'.

If the optional 'use_logout_redirect' flag is set to 0, a confirmation screen is given instead of redirecting the user to the 'logout_url'.

The optional 'urlencoding' parameter allows a special encoding to be used in producing the redirection path.

respond(self, trans)

Respond using the given transaction 'trans'.

_show_logout(self, trans, redirect)

Write a confirmation page to 'trans' containing the 'redirect' URL which the client should be sent to upon logout.

Class Variable Details

encoding

Type:
str
Value:
'utf-8'                                                                

Generated by Epydoc 2.1 on Tue Dec 6 18:20:22 2005 http://epydoc.sf.net