Package XSLForms :: Package Resources :: Module Login :: Class LoginRedirectResource
[show private | hide private]
[frames | no frames]

Class LoginRedirectResource

LoginRedirectResource --+
                        |
                       LoginRedirectResource


A redirect resource which uses dynamic knowledge about the URL space.

Method Summary
  __init__(self, host, path_to_login, *args, **kw)
Initialise the resource with the 'host', 'path_to_login' (the path from the root of the application to the login screen), and other LoginRedirectResource details.
  get_app_url(self, trans)
Return the application URL, using 'trans' if necessary, in order to provide a complete URL to redirect an authenticated user to their originally requested page.
  get_login_url(self, trans)
Return the login URL, using 'trans' if necessary, in order to provide a complete URL to redirect an authenticated user to their originally requested page.
    Inherited from LoginRedirectResource
  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
    Inherited from LoginRedirectResource
str encoding = 'utf-8'
str logout_page = '\n<html>\n  <head>\n    <title>Logout</ti...

Method Details

__init__(self, host, path_to_login, *args, **kw)
(Constructor)

Initialise the resource with the 'host', 'path_to_login' (the path from
the root of the application to the login screen), and other
LoginRedirectResource details.

To get the root of the application, this resource needs an attribute on
the transaction called "root".

Examples of 'path_to_login' with "root" attribute and result:

"login", "/" -> "/login"
"login", "/app/" -> "/app/login"
"app/login", "/" -> "/app/login"
Overrides:
WebStack.Resources.LoginRedirect.LoginRedirectResource.__init__

get_app_url(self, trans)

Return the application URL, using 'trans' if necessary, in order to
provide a complete URL to redirect an authenticated user to their
originally requested page. If the application URL is empty, any
redirects will be within the same application, rather than to
potentially completely different applications residing at arbitrary
locations.
Overrides:
WebStack.Resources.LoginRedirect.LoginRedirectResource.get_app_url (inherited documentation)

get_login_url(self, trans)

Return the login URL, using 'trans' if necessary, in order to
provide a complete URL to redirect an authenticated user to their
originally requested page.
Overrides:
WebStack.Resources.LoginRedirect.LoginRedirectResource.get_login_url (inherited documentation)

Generated by Epydoc 2.1 on Sat Jul 7 23:23:39 2007 http://epydoc.sf.net