[Zope] CookieCrumbler Authentication

Casey Duncan casey at zope.com
Thu Jan 8 14:36:09 EST 2004


On Wed, 7 Jan 2004 12:55:40 -0500
"kittonian" <kittonian at macgenius.net> wrote:

> I created the cookie crumbler instance and indeed the login form says
> that I've successfully logged in, however it's not exactly what I want
> here.  I need to use my own login page, not CC's default login page. 
> Mine is actually the index_html with a form element in it.  Where do I
> point that form so that it calls to CC's authentication properly?  

You don't need to point it anywhere in particular. It can just go to the
same page (i.e., <form action=".">). What matters is the names of the
username and password input elements. They need to match the names
configures in CookieCrumbler (__ac_name and __ac_password are the
defaults). It will sniff for them on the next request and log the user
in if they match a user (and you are not logged in through basic auth).

> What do I call the
> username and password text box form elements on my page?  How do I
> make it go to the members folder upon successfully authing?  How do I
> set it up so that I can do various error responses in my index_html
> page with the form on it (i.e. people who fail to auth need to be
> taken back to that page and see a message above the login form telling
> them that it failed to auth them)?

This is also configure in CC (defaults to login_form). Normally this
would be a separate login only form where users are redirected on
unauthorized. CC will handle redirecting the user back to the URL they
came from. You can make this go to your home page if you like, but that
will probably confuse users of the site.

hth,

-Casey



More information about the Zope mailing list