[Catalyst] auth::DBIC & session problems
Matt S Trout
dbix-class at trout.me.uk
Tue Aug 15 20:35:41 CEST 2006
leonard.a.jaffe at jpmchase.com wrote:
>
>
>
>
> Matt S Trout <dbix-class at trout.me.uk>
>
> > leonard.a.jaffe at jpmchase.com wrote:
> > > The problem
> > > lies inside the serialization of the DBIC object, which means I
> should not
> > > be the only person seeing this error message.
> >
> > Auth::Store::DBIC doesn't store the DBIC object into the session,
> only the
> > user id. If there's a DBIC object going into the session it's almost
> certainly
> > you putting it there :)
>
>
> The default behavior of session and auth used together to the stick the
> user
> in the session.
>
> From C::P::Authentication.pm:
>
>
> sub set_authenticated {
> my ( $c, $user ) = @_;
> $c->user($user);
> $c->request->{user} = $user; # compatibility kludge
> if ( $c->isa("Catalyst::Plugin::Session")
> and $c->config->{authentication}{use_session}
> and $user->supports("session") )
> {
> $c->save_user_in_session($user);
> }
> $c->NEXT::set_authenticated($user);
> }
save_user_in_session calls $user->for_session, which in Auth::Store::DBIC
returns $obj->id
--
Matt S Trout Offering custom development, consultancy and support
Technical Director contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more information
+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
More information about the Catalyst
mailing list