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, resource, authenticator, login_url, app_url, anonymous_parameter_name, anonymous_username, logout_parameter_name, logout_url, use_logout_redirect, urlencoding)
Initialise the resource with a 'resource' for the application being protected and an 'authenticator' protecting the resource.
  get_app_url(self, trans)
  get_login_url(self, trans)
  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, resource, authenticator, login_url=None, app_url=None, 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 'resource' for the application being
protected and an 'authenticator' protecting the resource.

If the optional 'login_url' and 'app_url' are provided, these values
will be used to locate the login application and protected application
respectively. Such values, if not provided, must be otherwise set at a
later time or provided by 'get_login_url' and 'get_app_url' methods in
a subclass of this class.

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 Wed Jan 10 23:28:13 2007 http://epydoc.sf.net