[Catalyst] Session example from Tutorial.pod doesn't work?

Yuval Kogman nothingmuch at woobling.org
Thu Feb 2 17:49:32 CET 2006


On Wed, Feb 01, 2006 at 17:37:22 -0700, catalyst wrote:
> I'm new to Catalyst and thought I'd start with the tutorial:
>   http://search.cpan.org/~mstrout/Catalyst-5.63/lib/Catalyst/Manual/Tutorial.pod
> 
> I've gotten through most of the "Users and Authenticating" section and it's all working as advertised, but the last part (sessions) doesn't. >From the doc:
> 
>     To keep the user logged in, all we need to do is
>     add the Session modules to our collection, and
>     the Auth modules will automatically use them;
> 
>       use Catalyst qw/-Debug Static::Simple Authentication 
>         Authentication::Store::Minimal 
>         Authentication::Credential::Password
>         Session Session::Store::File Session::State::Cookie/;
> 
>     Magic!
> 
> Unfortunately, the magic isn't working for me. When I call $c->login after a good login, the session apparently hasn't saved the credentials.

We had a problem like that recently. Are you possibly setting
YourApp->config *after* calling ->setup? that caused problems when
the default values (which are filled in at setup time) are zapped.

Please attach logs if this is not the case

> What's more, when I look at
> 
>   Catalyst::Plugin::Authentication::Credential::Password::login()
>
> I don't see any way that it could be using a session.


That part happens in
Catalyst::Plugin::Authentication::set_authenticated, a generic
method for marking a user as authenticated.

> It always wants a user and password to be explicitly passed or included in the CGI args.

That part I don't understand

-- 
 ()  Yuval Kogman <nothingmuch at woobling.org> 0xEBD27418  perl hacker &
 /\  kung foo master: /me spreads pj3Ar using 0wnage: neeyah!!!!!!!!!!!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20060202/ed34cda6/attachment.pgp


More information about the Catalyst mailing list