Author: | Domen Kožar <domen[ATNOSPAM]dev.si> |
---|---|
Version: | 0.3.0 |
Source: | http://www.bitbucket.org/iElectric/repozewhopluginsformcookie/ |
Bug tracker: | http://www.bitbucket.org/iElectric/repozewhopluginsformcookie/issues/ |
Overview
CookieRedirectingFormPlugin is based on repoze.who.plugins.form.RedirectingFormPlugin with slight changes:
Parameters: |
|
---|---|
Versionadded : | 0.3.0 encoding and fail_redirect_path parameters |
Called on abort(401). Set up came_from cookie and redirect to login_form_path.
if logout was performed, redirect to came_from.
on login:
Parse form vars login & password and if successful, return them. Redirect to came_from.
on logout:
Store came_from for challanger to find later and trigger abort(401).
expires came_from cookie because our authenticator succeeded
Function helper for plugin generation from .ini files.
Example configuration:
[plugin:formcookie]
use = repoze.who.plugins.formcookie:make_redirecting_plugin
login_form_path = /login_form
login_handler_path = /login
logout_handle_path = /logout
rememberer_name = cookie
force_https = true
login_redirect_method = /home/%(login)s/
logout_redirect_method = /
username_field = username
password_field = password
[plugin:cookie]
use = repoze.who.plugins.auth_tkt:make_plugin
secret = w00t
cookie_name = imin
[1] | (1, 2) Credential information is always passed forward to authenticator plugins as login and password. |
None at the moment, I’m open to suggestions.