[Catalyst] Extending C::Plugin::Authentication::Store::DBIC for additional constraints

Steve Sabljak steve.sabljak at gmail.com
Mon Mar 26 07:38:26 GMT 2007


On 3/26/07, Doran L. Barton <fozz at iodynamics.com> wrote:
> I'd like some advice on how to do this. I'm developing a single Cat app
> that will handle multiple sites by looking at the 'host' header. All
> sites will be associated with domain names under a specific domain. Think
> wildcard A records in DNS, if you will. For example, all of the following
> would be caught and handled by the app:
>
>    foo.mycatalystsite.com
>    bar.mycatalystsite.com
>    foobar.mycatalystsite.com
>
> I want each site to have its own pool of users for authentication. The
> users table, therefore, has a site_id associated with each user.
>
> Herein lies the gotcha! I need to be able to tell the Authentication plugin
> to authenticate the user using $username, $password, and a site_id (as
> opposed to the usual $username and $password). After looking through the
> Catalyst::Plugin::Authentication::Store::DBIC code, I can't immediately see
> how I could subclass it and add this functionality.
>
> Thoughts, anyone?
>

Seems like exactly the kind of thing the development release of
Catalyst::Plugin::Authentication supports with realms.
Have a look at http://search.cpan.org/~jayk/Catalyst-Plugin-Authentication-0.09999_01/

cheers,
Steve Sabljak



More information about the Catalyst mailing list