[Zope-CVS] CVS: Products/PluggableAuthService -
PluggableAuthService.py:1.6.2.2
Lennart Regebro
regebro at nuxeo.com
Mon Aug 30 12:02:05 EDT 2004
Update of /cvs-repository/Products/PluggableAuthService
In directory cvs.zope.org:/tmp/cvs-serv29327
Modified Files:
Tag: regebro-implement_challenge-branch
PluggableAuthService.py
Log Message:
Only challenge after anonymous failed. Try all challengers until one raises "Redirect".
=== Products/PluggableAuthService/PluggableAuthService.py 1.6.2.1 => 1.6.2.2 ===
--- Products/PluggableAuthService/PluggableAuthService.py:1.6.2.1 Mon Aug 30 10:43:00 2004
+++ Products/PluggableAuthService/PluggableAuthService.py Mon Aug 30 12:02:05 2004
@@ -282,20 +282,6 @@
if user is not None:
return user
- # No validation in upper user folders: Make a challenge
- challengers = plugins.listPlugins(IChallengePlugin)
- if challengers:
- # We just pick the first one
- challenger_id, challenger = challengers[0]
- try:
- return challenger.challenge(request, request.RESPONSE)
- except _SWALLOWABLE_PLUGIN_EXCEPTIONS:
- LOG('PluggableAuthService', WARNING,
- 'ChallengePlugin %s error' % challenger_id,
- error=sys.exc_info())
-
- return None
-
#
# No other user folder above us can satisfy, and we have no user;
# return a constructed anonymous only if anonymous is authorized.
@@ -310,6 +296,18 @@
):
return anonymous
+ # No validation in upper user folders: Make a challenge
+ challengers = plugins.listPlugins(IChallengePlugin)
+ for challenger_id, challenger in challengers:
+ try:
+ # A successful challenge involves raising a
+ # "Redirect", url exception.
+ challenger.challenge(request, request.RESPONSE)
+ except _SWALLOWABLE_PLUGIN_EXCEPTIONS:
+ LOG('PluggableAuthService', WARNING,
+ 'ChallengePlugin %s error' % challenger_id,
+ error=sys.exc_info())
+
return None
security.declareProtected( SearchPrincipals, 'searchUsers')
More information about the Zope-CVS
mailing list