[ZPatterns] LoginManager: programmatically logging someone in
Jean Jordaan
[email protected]
Mon, 20 Jan 2003 22:33:30 +0200
Hi Phillip
Thanks for your response!
> What does "log the user in" mean?
Make it so that they're authenticated with the site, and can browse
the members area as the member they've just registered.
> If you're
> using cookies, you need to set the cookie (and perhaps issue a redirect
> to the desired page).
We're using cookies. I thought I should use
BasicCookieLogin.setCookie, or BasicCookieLogin.findLogin, which calls
setCookie. But neither of these are methods of LoginManager, they're
methods of a particular LoginMethod (and I'm under the impression that
only the LoginManager's methods are available to be called from my
app). So I thought perhaps I should use LoginManager.validate, which
calls findLogin on the right LoginMethod. The only parameter of
validate which BasicCookieLogin.findLogin examines, is REQUEST
(looking for '__ac_name' and '__ac_password'). At the moment, calling
LoginManager.validate looks like the correct way. I'll try that at work
tomorrow.
--
[email protected]