summaryrefslogtreecommitdiff
path: root/paste/auth/multi.py
diff options
context:
space:
mode:
authorcce <devnull@localhost>2006-02-24 06:24:10 +0000
committercce <devnull@localhost>2006-02-24 06:24:10 +0000
commit3ece86d36d841c3d5023f7bab029c0b2b235e7e7 (patch)
tree1244c60800daaf2b9d42d6960195909ff84f571f /paste/auth/multi.py
parent29dda90805f7eb854bf0b9557a3d6f300e41fad3 (diff)
downloadpaste-3ece86d36d841c3d5023f7bab029c0b2b235e7e7.tar.gz
This updates the paste.auth.* modules to include
environ in the authentication callback functions. - auth.basic was modified to have a callback of authfunc(environ, username, password) - auth.digest was modified in a similar manner, authfunc(environ, realm, password) - auth.digest's digest_password also had it's arguments reversed to be consistent with the corresponding authfunc(); if you're going to break -- let's fix two things at once! - auth.form has a change similar to auth.basic These changes were suggested via Matthew Scott on the paste mailing list; only that I put the environ first to be consistent with other WSGI functions.
Diffstat (limited to 'paste/auth/multi.py')
-rw-r--r--paste/auth/multi.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/paste/auth/multi.py b/paste/auth/multi.py
index 47becae..12c9f26 100644
--- a/paste/auth/multi.py
+++ b/paste/auth/multi.py
@@ -18,12 +18,12 @@ stack; by default it uses form-based authentication unless
>>> from paste.httpserver import serve
>>>
>>> multi = multi.MultiHandler(dump_environ)
->>> def authfunc(realm, user):
-... return digest.digest_password(user, realm, user)
+>>> def authfunc(environ, realm, user):
+... return digest.digest_password(realm, user, user)
>>> multi.add_method('digest', digest.middleware, "Test Realm", authfunc)
>>> multi.set_query_argument('digest')
>>>
->>> def authfunc(username, password):
+>>> def authfunc(environ, username, password):
... return username == password
>>> multi.add_method('form', form.middleware, authfunc)
>>> multi.set_default('form')