Long story longer, I wrote my own Auth store. While I could auth users, it would in no way shape or form save itself to a session even though Session was loaded, there was a for_session() sub and the user object supports sessions. One week it worked. This week it didn't. After tearing my hair out and some convo w/jayk, I finally realized the problem.
Last week, I actually had an authentication section in my .yml file. This week I don't because I moved to my custom store which needs no config. According to the Auth pod: > use_session > > Whether or not to store the user's logged in state in the session, if the > application is also using the Catalyst::Plugin::Session plugin. This value is > set to true per default. So, it should work, but doesn't. After looking at the code, this jumped out at me: > sub setup { > my $c = shift; > > my $cfg = $c->config->{authentication} || {}; > > %$cfg = ( > use_session => 1, > %$cfg, > ); > > $c->register_auth_stores( > default => $cfg->{store}, > %{ $cfg->{stores} || {} }, > ); > > $c->NEXT::setup(@_); > } If there is no authentication config section, an anon hash is created, and the use_session is set....but never saved back into catalyst config. Granted, it's rare that one would have no authentication section in config (unless they write their own), so leave it up to my to find the edge case. :-) -=Chris
signature.asc
Description: OpenPGP digital signature
_______________________________________________ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/