[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/pas/ loginform.pt
added
Ralph Barthel
ralph.barthel at 21ll.com
Mon Oct 11 09:43:22 EDT 2004
Log message for revision 27976:
loginform.pt added
Changed:
U Zope3/trunk/src/zope/app/pas/browser/configure.zcml
A Zope3/trunk/src/zope/app/pas/browser/loginform.pt
U Zope3/trunk/src/zope/app/pas/browserplugins.py
U Zope3/trunk/src/zope/app/pas/challengeplugins.zcml
U Zope3/trunk/src/zope/app/pas/pas.py
-=-
Modified: Zope3/trunk/src/zope/app/pas/browser/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/pas/browser/configure.zcml 2004-10-11 13:36:03 UTC (rev 27975)
+++ Zope3/trunk/src/zope/app/pas/browser/configure.zcml 2004-10-11 13:43:22 UTC (rev 27976)
@@ -2,6 +2,12 @@
xmlns:zope="http://namespaces.zope.org/zope"
xmlns="http://namespaces.zope.org/browser">
+ <page
+ name="loginForm.html"
+ for="*"
+ template="loginform.pt"
+ permission="zope.Public" />
+
<pages
permission="zope.ManageServices"
for="..zodb.IPersistentPrincipalStorage"
@@ -14,4 +20,6 @@
</pages>
+
+
</zope:configure>
Added: Zope3/trunk/src/zope/app/pas/browser/loginform.pt
===================================================================
--- Zope3/trunk/src/zope/app/pas/browser/loginform.pt 2004-10-11 13:36:03 UTC (rev 27975)
+++ Zope3/trunk/src/zope/app/pas/browser/loginform.pt 2004-10-11 13:43:22 UTC (rev 27976)
@@ -0,0 +1,32 @@
+<html metal:use-macro="context/@@standard_macros/page">
+<head>
+ <title metal:fill-slot="title" i18n:translate="">
+ Translation Service - Translate
+ </title>
+</head>
+<body><div metal:fill-slot="body">
+ <p i18n:translate="">Please provide Login Information</p>
+
+ <form action="" method="post">
+ <div class="row">
+ <div class="label" i18n:translate="">Login</div>
+ <div class="field">
+ <input type="text" name="login"/>
+ </div>
+ </div>
+
+ <div class="row">
+ <div class="label" i18n:translate="">Password</div>
+ <div class="field">
+ <input type="password" name="password"/>
+ </div>
+ </div>
+
+ <div class="row">
+ <input class="form-element" type="submit"
+ name="SUBMIT" value="Login" i18n:attributes="value" />
+ </div>
+
+ </form>
+</div></body></html>
+
Modified: Zope3/trunk/src/zope/app/pas/browserplugins.py
===================================================================
--- Zope3/trunk/src/zope/app/pas/browserplugins.py 2004-10-11 13:36:03 UTC (rev 27975)
+++ Zope3/trunk/src/zope/app/pas/browserplugins.py 2004-10-11 13:43:22 UTC (rev 27976)
@@ -76,7 +76,6 @@
return {'username': sessionData['username'],
'password': sessionData['password']}
-
class FormChallenger(Persistent, Contained):
""" Query the user for credentials using a browser form.
@@ -106,7 +105,7 @@
def getLoginPage(self):
""" return configurable login page """
- return '/login.html'
+ return '/@@loginForm.html'
def challenge(self, request, response):
""" Response shuold redirect to login page cause Credebtials
Modified: Zope3/trunk/src/zope/app/pas/challengeplugins.zcml
===================================================================
--- Zope3/trunk/src/zope/app/pas/challengeplugins.zcml 2004-10-11 13:36:03 UTC (rev 27975)
+++ Zope3/trunk/src/zope/app/pas/challengeplugins.zcml 2004-10-11 13:43:22 UTC (rev 27976)
@@ -23,6 +23,13 @@
permission="zope.ManageServices"
/>
+ <localUtility class=".browserplugins.FormChallenger">
+
+ <implements
+ interface="zope.app.annotation.interfaces.IAttributeAnnotatable" />
+
+ </localUtility>
+
<browser:addMenuItem
title="PAS Browser Session Challenge Plugin"
description="A PAS Challenge Plugin"
Modified: Zope3/trunk/src/zope/app/pas/pas.py
===================================================================
--- Zope3/trunk/src/zope/app/pas/pas.py 2004-10-11 13:36:03 UTC (rev 27975)
+++ Zope3/trunk/src/zope/app/pas/pas.py 2004-10-11 13:43:22 UTC (rev 27976)
@@ -149,11 +149,12 @@
if protocol is None or challenger_protocol == protocol:
if challenger.challenge(request, request.response):
if challenger_protocol is None:
- break
+ return
elif protocol is None:
protocol = challenger_protocol
- return self._delegate('unauthorized', id, request)
+ if protocol is None:
+ self._delegate('unauthorized', id, request)
def _delegate(self, meth, *args):
# delegate to next AS
More information about the Zope3-Checkins
mailing list