[Catalyst] authentication plugin advice

Jonathan Rockway jon at jrock.us
Thu Jul 27 16:40:51 CEST 2006


=pod

I use pubcookie for authentication, which is similar.  In catalyst, I 
have an C<auto> function in my Root controller that basically just does:

     my $user = $c->request->user;
     if(!$user){
       # something bad happened with Pubcookie
       $c->detach('/error/not_logged_in');
     }
     $c->stash->{user} = $user;
     # etc.

I checked the manpage, and it says $c->request->user is deprecated and 
that $c->user should be used instead.  There's no mention of $c->user 
existing elsewhere in the docs, though, so I'm not sure about that.  I 
will test and get back to you (well, the list anyway).

Again, as with perl, There's More Than One Way To Do It, so YMMV.  I 
like Catalyst because I can do my own thing (as evidenced by my blog 
software, L<http://www.jrock.us/trac/blog_software>; there are slides 
there that talk about my PGP-based auth model, and my non-database 
database :)

Regards,
Jonathan Rockway

Len Jaffe wrote:
> So I have a semi goofy authentication plugin that I
> have to spin soon, and I thought I'd just ask here for
> any advice on how to go about it, and to entertain you
> all.
>
> I have siteminder hooked into apache via a module, so
> any request to my server is authenticated by
> siteminder before the request can be processed.  Once
> authnicated to sitemeinder, the request is allowed to
> hit my cat app, and I get some http headers, one of
> which tells me the users ID.
>
> So I need to craft auth plugins to use the ID as
> username, not bother with passwords, and look up the
> user record from my DBIC user table.
>
> Authz will use the DBIC modules and not need
> customization, but I need advice as to which modules I
> need to write, crib&customize.  
>
> I read the authn/authz docs, but I'm still a little
> fuzzy on the details.
>
> Do I need to write a store::backend?
> a login method?
> other stuff?
>
> Thanks.
> Len.
>
>
>
> Leonard A. Jaffe     lenjaffe at jaffesystems.com
> Leonard Jaffe Computer Systems Consulting Ltd.
> Columbus, OH, USA 614-404-4214 F: 530-380-7423
>
> _______________________________________________
> List: Catalyst at 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/
>   


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 368 bytes
Desc: OpenPGP digital signature
Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20060727/0527adc4/attachment.pgp 


More information about the Catalyst mailing list