Mercurial > moin > 1.9
changeset 4312:9831c40c5bd9
Code review: added doc strings, added missing abort check
author | Florian Krupicka <florian.krupicka@googlemail.com> |
---|---|
date | Fri, 15 Aug 2008 10:43:57 +0200 |
parents | bafefd635670 |
children | 0ab9e5a38822 |
files | MoinMoin/auth/__init__.py |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/MoinMoin/auth/__init__.py Fri Aug 15 10:23:58 2008 +0200 +++ b/MoinMoin/auth/__init__.py Fri Aug 15 10:43:57 2008 +0200 @@ -259,6 +259,11 @@ def handle_login(request, userobj=None, username=None, password=None, attended=True, openid_identifier=None, stage=None): + """ + Process a 'login' request by going through the configured authentication + methods in turn. The passable keyword arguments are explained in more + detail at the top of this file. + """ params = { 'username': username, 'password': password, @@ -292,9 +297,13 @@ if msg and not msg in request._login_messages: request._login_messages.append(msg) + if not cont: + break + return userobj def handle_logout(request, userobj): + """ Logout the passed user from every configured authentication method. """ for authmethod in request.cfg.auth: userobj, cont = authmethod.logout(request, userobj, cookie=request.cookies) if not cont: @@ -302,6 +311,7 @@ return userobj def handle_request(request, userobj): + """ Handle the per-request callbacks of the configured authentication methods. """ for authmethod in request.cfg.auth: userobj, cont = authmethod.request(request, userobj, cookie=request.cookies) if not cont: