[Catalyst] Need some help with Authorization setup
kakimoto at tpg.com.au
kakimoto at tpg.com.au
Tue May 12 12:17:43 GMT 2009
Quoting Kieren Diment <diment at gmail.com>:
> Try prodding around your code with the debugger.
Yep and done that. I could login without a problem just that the 'roles'
never get populated.
Any ideas to debug?
> The docs are fine, and I think roles support should work out of the
> box, but use the http credential, as it's easier to get up.
1) Nah, not using http credentials. The requirement/design for my app is
to have user credentials stored in the database tables, users,
user_roles and roles.
2) There's way too many docs available for Authorization and some
vagueness about the effectiveness of the documentation.
- headed to the docs for Catalyst::Plugin::Authorization::Roles - it
doesn't describe the module, its purpose and so forth in good depth of
detail
- There's another reference link in that documentation that points
to http://catalyst.perl.org/calendar/2005/24
- Headed over there and found that the article is obsolete. Been
told to go to
http://dev.catalyst.perl.org/wiki/gettingstarted/howtos/interim_authorization_and_authentication_example
instead.
- Headed over there and then it says that "The new Authentication
tutorial is now available on CPAN. Please use that instead of the
example below."
- Headed over to the Catalyst tute, did whatever's needed there and
yet I still have this issue of the roles not getting into the catalyst
user object.
1) clearly, there's too many redirections - I hope someone can just
delete the material that's no longer relevant (ie deprecated)
2) I need some help, guys as the catalyst tute for authorization
doesn't work for me. I am using postgresql database as a backend.
I seem to find that
>
> Put the following in Controller::Root:
>
> sub auto : Private {
> my ($self, $c) = @_;
> $c->authenticate;
> }
>
> and then have a poke around with TT and with the debugger to see
> what's missing or wrong in your setup.
>
may i ask how so?
I'm in Login->index and I could authenticate just fine. I have tried
dumping out the value of $c->user->roles and it's got nothing.
Helpppp!!
More information about the Catalyst
mailing list