[Catalyst] Session/Authentication/Authorization for legacy + Cat

Matt S Trout dbix-class at trout.me.uk
Thu Nov 22 14:36:40 GMT 2007

On Tue, Nov 20, 2007 at 04:13:28PM -0800, Ashley Pond V wrote:
> >C::P:Session::CGISession, puts the data under
> >   our $SESSION_DATA_PARAMETER_NAME = '_catalyst_session';
> >for cross-compat with other Session hooks, but it hides it from
> >the legacy store which is in the same level under _DATA. So the
> >Cat manipulated session info is under
> >    $session->param("_catalyst_session")
> >for the legacy code and the Cat code has no access to anything the
> >legacy code sets in the session.
> >
> ># some data trimmed out for brevity
> >'_DATA' => {
> >             'rand_set_in_legacy' => '6.3108406432821',
> >             '_catalyst_session' => {
> >                                     'rand_set_in_cat' =>  
> >'16.4781763075979',
> >                                     },
> >             '_SESSION_ID' => 'f15b8a17d0fc00a43601226837afd5e8',
> >           }
> >
> >So, this makes it pretty tricky to mix the two. I'd like to have  
> >the Cat::Plugin work at the same level as the vanilla CGI::Session;  
> >the "_DATA" store for all top level params. Of course for  
> >compatibility with other Cat stuff, the "_catalyst_session" would  
> >still work, it would just be a reference to the "_DATA."
> So I have a patch, I think, which makes it work on the same internal
> data hash for both the Cat and vanilla versions so they can use the
> same session transparently. I've offered it to the author, if he
> thinks it's a good change.

I seriously doubt he will, or he wouldn't have written it like that
in the first place. The logical approach would seem to me to be to make
the key name configurable, and have an explicitly provided key of undef
mean "just use the base hash".
> On unrelated and deeply buried points I would also like to add for the
> record (again), that I never start a new thread by replying to an
> old message even though the list threads make it look that way.
> Mail.app is either doing something squirrelly or my mail host is.
> Also the (this archive seems to be stuck in September:
>   http://www.mail-archive.com/catalyst@lists.rawmode.org/
> This one is up to date:
>   http://lists.scsys.co.uk/pipermail/catalyst/

Evidently they failed to track the rawmode -> scsys host change.

      Matt S Trout       Catalyst and DBIx::Class consulting and support -
   Technical Director      http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Christmas fun in collectable card game form -

More information about the Catalyst mailing list