Subject: | Documentation wrong, |
Thanks for your efforts in documenting this!
I found a bug in
http://search.cpan.org/~bobtfish/Catalyst-Plugin-Authentication-0.10011/lib/Catalyst/Plugin/Authentication.pm
In the chapter "Example" I read
==
__PACKAGE__->config->{'Plugin::Authentication'} =
{
default => {
credential => {
class => 'Password',
password_field => 'password',
password_type => 'clear'
},
store => {
class => 'Minimal',
users => {
bob => {
password => "s00p3r",
editor => 'yes',
roles => [qw/edit delete/],
},
william => {
password => "s3cr3t",
roles => [qw/comment/],
}
}
}
}
};
==
but it should be
==
__PACKAGE__->config->{'Plugin::Authentication'} = {
default_realm => 'default',
realms => {
default => {
credential => {
class => 'Password',
password_field => 'password',
password_type => 'clear'
},
store => {
class => 'Minimal',
users => {
bob => {
password => "s00p3r",
editor => 'yes',
roles => [qw/edit delete/],
},
william => {
password => "s3cr3t",
roles => [qw/comment/],
}
}
}
}
}
};
==
Without the key "realms" not any realm can be found when executing the code.
A little later there is an example code:
==
$c->res->body( "hello " . $c->user->get("name") );
==
where $c->user->get("name") --> undef.
I think it should read
==
$c->res->body( "hello " . $c->user->get("id") );
==
Greetings,
Horshack