[Catalyst] Problem with authentication
Renee Bäcker
mailinglisten at renee-baecker.de
Wed Apr 22 12:39:08 GMT 2009
Tomas Doran schrieb:
>
> Nothing appears wrong with that code.
>
> However you haven't shown us your authentication config, so we don't
> know what you're authenticating with / against.
>
> If you could also include the debug log of the hit which calls
> $c->authenticate and then redirects, and the hit after that it would be
> helpful.
Log output:
[info] *** Request 1 (0.167/s) [10155] [Wed Apr 22 12:56:43 2009] ***
[debug] Body Parameters are:
.-------------------------------------+--------------------------------------.
| Parameter | Value
|
+-------------------------------------+--------------------------------------+
| password | secret
|
| username | reneeb
|
'-------------------------------------+--------------------------------------'
[debug] "POST" request for "root/login" from "127.0.0.1"
[debug] Path is "root/login"
[debug] login successful:
[debug] Finding template to render ...
[debug] Trying to render template
"/dir/templates/start.tmpl" ...
[debug] Redirecting to "http://localhost:3000/root/start"
[info] Request took 0.167890s (5.956/s)
.------------------------------------------------------------+-----------.
| Action | Time
|
+------------------------------------------------------------+-----------+
| /root/login | 0.114807s
|
| /end | 0.036004s
|
| -> GriPS::View::TT->process | 0.033808s
|
'------------------------------------------------------------+-----------'
[info] *** Request 2 (0.333/s) [10155] [Wed Apr 22 12:56:43 2009] ***
[debug] "GET" request for "root/start" from "127.0.0.1"
[debug] Path is "root/start"
[debug] Finding template to render ...
[debug] Trying to render template
"/dir/templates/start.tmpl" ...
[error] Caught exception in GriPS::Controller::Root->start "Can't call
method "user_id" on an undefined value at
/dir/../lib/GriPS/Controller/Root.pm
line 52."
[info] Request took 0.110155s (9.078/s)
.------------------------------------------------------------+-----------.
| Action | Time
|
+------------------------------------------------------------+-----------+
| /root/start | 0.002196s
|
| /end | 0.006856s
|
| -> GriPS::View::TT->process | 0.004974s
|
'------------------------------------------------------------+-----------'
and this is the configuration:
authentication:
default_realm: default
realms:
default:
credential:
class: Password
password_field: passwd
password_type: clear
store:
class: DBIx::Class
user_class: DB::grips_user
role_relation: rolenames
role_field: role
>
> Cheers
> t0m
Thanks!
- Renee
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>
>
--
Perl-Magazin: http://perl-magazin.de
Perl-Nachrichten: http://perl-nachrichten.de
More information about the Catalyst
mailing list