[Newbie] Making my own authentication form
Hi all, I'm a Zope really new user. I'm trying to writing a form to make users log in from a site page, without using the HTTP standard authentication window. How can I do this? What methods I have to recall and what paramteres I have to pass them? Many thanks Alex Cordero Prova Genie Disco Virtuale: 10 gg. gratis per te! Per attivarlo clicca qui http://www.genie.it/provadiscovirtuale
On Thu, 7 Mar 2002 aleciesse@infinito.it wrote:
Hi all, I'm a Zope really new user. I'm trying to writing a form to make users log in from a site page, without using the HTTP standard authentication window. How can I do this? What methods I have to recall and what paramteres I have to pass them?
Many thanks
Alex Cordero
Prova Genie Disco Virtuale: 10 gg. gratis per te! Per attivarlo clicca qui http://www.genie.it/provadiscovirtuale
Install CookieCrumbler (for pure cookie authentication) or exUserFolder (for cookie authentication + database lookups of user data). Both of these are set up for you; you just have to customize the login/logout forms (in DTML). -- Joel BURTON | joel@joelburton.com | joelburton.com | aim: wjoelburton Independent Knowledge Management Consultant
Hi, I'm also trying to do this but I want to be able to create the user folders and users programmatically (with either python or zope). I can do this for the normal acl_users forlders but have had no success with CUF. Does anyone have any experience of this with CUF or CookieCrumbler or anything else? I must have a logout button as well. Any help would be gratefully received. Thanks Zahid On Thu, Mar 07, 2002 at 01:27:13PM -0500, Joel Burton wrote:
On Thu, 7 Mar 2002 aleciesse@infinito.it wrote:
Hi all, I'm a Zope really new user. I'm trying to writing a form to make users log in from a site page, without using the HTTP standard authentication window. How can I do this? What methods I have to recall and what paramteres I have to pass them?
Many thanks
Alex Cordero
Prova Genie Disco Virtuale: 10 gg. gratis per te! Per attivarlo clicca qui http://www.genie.it/provadiscovirtuale
Install CookieCrumbler (for pure cookie authentication) or exUserFolder (for cookie authentication + database lookups of user data). Both of these are set up for you; you just have to customize the login/logout forms (in DTML).
--
Joel BURTON | joel@joelburton.com | joelburton.com | aim: wjoelburton Independent Knowledge Management Consultant
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- -------------------------------------------------------------------- Dr Zahid Malik Tel: +44 (0) 20 7594 6336 Research Fellow Fax: +44 (0) 20 7581 4419 Dept. of Electrical Eng. Email: z.malik@ic.ac.uk Imperial College http://infoeng.ee.ic.ac.uk/~malikz Exhibition Road London SW7 2BT
On Thu, 7 Mar 2002, Zahid Malik wrote:
Hi,
I'm also trying to do this but I want to be able to create the user folders and users programmatically (with either python or zope). I can do this for the normal acl_users forlders but have had no success with CUF.
Does anyone have any experience of this with CUF or CookieCrumbler or anything else? I must have a logout button as well.
Any help would be gratefully received.
Thanks
Zahid
CookieCrumbler isn't a replacement user-folder, it uses the standard acl_users ZODB user folder, so there should be no problem adding users normally. Adding users works fine w/exUserFolder; there's a well-defined API to add users which is the same as the normal acl_users. -- Joel BURTON | joel@joelburton.com | joelburton.com | aim: wjoelburton Independent Knowledge Management Consultant
Many thanks I'll look at cookie crumbler because that would be ideal for my purposes although have played with exUserFolder before but couldn't get the forms working. That was a few revisions ago so things might have changed. Zahid On Thu, Mar 07, 2002 at 01:48:22PM -0500, Joel Burton wrote:
On Thu, 7 Mar 2002, Zahid Malik wrote:
Hi,
I'm also trying to do this but I want to be able to create the user folders and users programmatically (with either python or zope). I can do this for the normal acl_users forlders but have had no success with CUF.
Does anyone have any experience of this with CUF or CookieCrumbler or anything else? I must have a logout button as well.
Any help would be gratefully received.
Thanks
Zahid
CookieCrumbler isn't a replacement user-folder, it uses the standard acl_users ZODB user folder, so there should be no problem adding users normally.
Adding users works fine w/exUserFolder; there's a well-defined API to add users which is the same as the normal acl_users.
--
Joel BURTON | joel@joelburton.com | joelburton.com | aim: wjoelburton Independent Knowledge Management Consultant
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- -------------------------------------------------------------------- Dr Zahid Malik Tel: +44 (0) 20 7594 6336 Research Fellow Fax: +44 (0) 20 7581 4419 Dept. of Electrical Eng. Email: z.malik@ic.ac.uk Imperial College http://infoeng.ee.ic.ac.uk/~malikz Exhibition Road London SW7 2BT
El jue, 07-03-2002 a las 23:04, Zahid Malik escribió:
Many thanks
I'll look at cookie crumbler because that would be ideal for my purposes although have played with exUserFolder before but couldn't get the forms working. That was a few revisions ago so things might have changed.
Cookie crumbler is very easy to configure and works fine. Only you need is to redefine the login_form.dtml, logged_in.dtml and logged_out.dtml and all works ok. I have defined this DTML methods in my own product and create an User Folder and a Cookie Crumbler (with its default login methods), after I create this login forms in the same folder that lives acl_user an Cookie crumbler and all works ok... Greetings -- Microsoft merges technologoies: Windows CE + Windows ME + Windows NT = Windows CEMENT ---- Antonio Beamud Montero Agora Systems S.A. http://www.agoratechnologies.com
That is very encouraging to here. If it is ok with you I think it would be useful for people if you could possibly post some code snippets showing exactly how you did the dtml methods. I know I would find this extremely useful and time saving. I will definetly be going down the CookieCrumbler route. I even emailed Jens (who wrote CUF) and he reccommended use using CookieCrumbler with a normal acl_user folder for this type of problem. Thanks for your time Zahid On Fri, Mar 08, 2002 at 09:35:23AM +0100, Antonio Beamud Montero wrote:
El jue, 07-03-2002 a las 23:04, Zahid Malik escribi?:
Many thanks
I'll look at cookie crumbler because that would be ideal for my purposes although have played with exUserFolder before but couldn't get the forms working. That was a few revisions ago so things might have changed.
Cookie crumbler is very easy to configure and works fine. Only you need is to redefine the login_form.dtml, logged_in.dtml and logged_out.dtml and all works ok. I have defined this DTML methods in my own product and create an User Folder and a Cookie Crumbler (with its default login methods), after I create this login forms in the same folder that lives acl_user an Cookie crumbler and all works ok...
Greetings -- Microsoft merges technologoies: Windows CE + Windows ME + Windows NT = Windows CEMENT
---- Antonio Beamud Montero Agora Systems S.A.
-- -------------------------------------------------------------------- Dr Zahid Malik Tel: +44 (0) 20 7594 6336 Research Fellow Fax: +44 (0) 20 7581 4419 Dept. of Electrical Eng. Email: Imperial College http://infoeng.ee.ic.ac.uk/~malikz Exhibition Road London SW7 2BT
This is a FAQ that I have never seen a good answer for... I have never found a how-to or any references to the API. The best solutuion I have seen is to search for "User products" that implement their own way of doing things. (search for CookieCrumbler, XUF..etc.) And read the source. But this doesnt really help you with your question... "how to do it yourself." IMHO, this is a shortcoming of Zope and since I am lobbying for this... :) Add your 2 cents in that "the acl_users API be extended for HTML login-forms, cookie auth, and extensible-properties-of-users" should be added to Z2.6. An API needs to be defined to deprecate all these user solutions that dont play well together. Cheers, Trevor
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of aleciesse@infinito.it Sent: Thursday, March 07, 2002 11:18 AM To: zope@zope.org Subject: [Zope] [Newbie] Making my own authentication form
Hi all, I'm a Zope really new user. I'm trying to writing a form to make users log in from a site page, without using the HTTP standard authentication window. How can I do this? What methods I have to recall and what paramteres I have to pass them?
Many thanks
Alex Cordero
Prova Genie Disco Virtuale: 10 gg. gratis per te! Per attivarlo clicca qui http://www.genie.it/provadiscovirtuale
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
On Thu, 7 Mar 2002, Trevor Toenjes wrote:
This is a FAQ that I have never seen a good answer for... I have never found a how-to or any references to the API.
The best solutuion I have seen is to search for "User products" that implement their own way of doing things. (search for CookieCrumbler, XUF..etc.) And read the source. But this doesnt really help you with your question... "how to do it yourself."
IMHO, this is a shortcoming of Zope and since I am lobbying for this... :) Add your 2 cents in that "the acl_users API be extended for HTML login-forms, cookie auth, and extensible-properties-of-users" should be added to Z2.6. An API needs to be defined to deprecate all these user solutions that dont play well together.
Cheers, Trevor
Ummm... perhaps I'm missing something, but it's really quite easy with exUserFolder or CookieCrumbler. They provide login DTML forms and you can just customized them if you want to change their appearance. Don't have to get involved in the API at all to make this happen. I think that extensible-properties-of-users, non-ZODB-authentication, and cookie-auth are all things that should be moved into the core. I'd root for exUserFolder for this; it's very flexible about where the data is stored, and uses extensible-user-properties. -- Joel BURTON | joel@joelburton.com | joelburton.com | aim: wjoelburton Independent Knowledge Management Consultant
THe thing is I (and presumably others) want to to have our custom forms to let others set-up users etc. For this we need the API. On Thu, Mar 07, 2002 at 03:20:49PM -0500, Joel Burton wrote:
On Thu, 7 Mar 2002, Trevor Toenjes wrote:
This is a FAQ that I have never seen a good answer for... I have never found a how-to or any references to the API.
The best solutuion I have seen is to search for "User products" that implement their own way of doing things. (search for CookieCrumbler, XUF..etc.) And read the source. But this doesnt really help you with your question... "how to do it yourself."
IMHO, this is a shortcoming of Zope and since I am lobbying for this... :) Add your 2 cents in that "the acl_users API be extended for HTML login-forms, cookie auth, and extensible-properties-of-users" should be added to Z2.6. An API needs to be defined to deprecate all these user solutions that dont play well together.
Cheers, Trevor
Ummm... perhaps I'm missing something, but it's really quite easy with exUserFolder or CookieCrumbler. They provide login DTML forms and you can just customized them if you want to change their appearance. Don't have to get involved in the API at all to make this happen.
I think that extensible-properties-of-users, non-ZODB-authentication, and cookie-auth are all things that should be moved into the core. I'd root for exUserFolder for this; it's very flexible about where the data is stored, and uses extensible-user-properties.
--
Joel BURTON | joel@joelburton.com | joelburton.com | aim: wjoelburton Independent Knowledge Management Consultant
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- -------------------------------------------------------------------- Dr Zahid Malik Tel: +44 (0) 20 7594 6336 Research Fellow Fax: +44 (0) 20 7581 4419 Dept. of Electrical Eng. Email: z.malik@ic.ac.uk Imperial College http://infoeng.ee.ic.ac.uk/~malikz Exhibition Road London SW7 2BT
THe thing is I (and presumably others) want to have our custom forms to let others set-up users etc. For this we need the API. Exactly!! I currently have the need to build a custom HTML form based user management interface to allow a few people administer many users and their user-properties.
In the interests of the Zope-10x effort, I place HTML login forms in the Top 3 things every new user wants to try immediately. So let's add it to the core.
I couldn't agree more. Zope really needs login forms and a proper way for users to logout. I know that there are products that try and do these things but it should be built-in. On Thu, Mar 07, 2002 at 03:06:10PM -0500, Trevor Toenjes wrote:
This is a FAQ that I have never seen a good answer for... I have never found a how-to or any references to the API.
The best solutuion I have seen is to search for "User products" that implement their own way of doing things. (search for CookieCrumbler, XUF..etc.) And read the source. But this doesnt really help you with your question... "how to do it yourself."
IMHO, this is a shortcoming of Zope and since I am lobbying for this... :) Add your 2 cents in that "the acl_users API be extended for HTML login-forms, cookie auth, and extensible-properties-of-users" should be added to Z2.6. An API needs to be defined to deprecate all these user solutions that dont play well together.
Cheers, Trevor
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of aleciesse@infinito.it Sent: Thursday, March 07, 2002 11:18 AM To: zope@zope.org Subject: [Zope] [Newbie] Making my own authentication form
Hi all, I'm a Zope really new user. I'm trying to writing a form to make users log in from a site page, without using the HTTP standard authentication window. How can I do this? What methods I have to recall and what paramteres I have to pass them?
Many thanks
Alex Cordero
Prova Genie Disco Virtuale: 10 gg. gratis per te! Per attivarlo clicca qui http://www.genie.it/provadiscovirtuale
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- -------------------------------------------------------------------- Dr Zahid Malik Tel: +44 (0) 20 7594 6336 Research Fellow Fax: +44 (0) 20 7581 4419 Dept. of Electrical Eng. Email: z.malik@ic.ac.uk Imperial College http://infoeng.ee.ic.ac.uk/~malikz Exhibition Road London SW7 2BT
aleciesse@infinito.it writes:
Hi all, I'm a Zope really new user. I'm trying to writing a form to make users log in from a site page, without using the HTTP standard authentication window. How can I do this? What methods I have to recall and what paramteres I have to pass them? You cannot with the built in user folder (unless you install and use Cookie Crumbler).
But there are numerous user folder products which support cookie based authentication. I recommend you look at "exUserFolder", a very nice user folder. For background reading, I suggest the section "Authentication" in <http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html> Dieter
participants (6)
-
aleciesse@infinito.it -
Antonio Beamud Montero -
Dieter Maurer -
Joel Burton -
Trevor Toenjes -
Zahid Malik