$self->name($realmname);
$app->log->debug("Setting up auth realm $realmname") if $app->debug;
- if (!exists($config->{'store'}{'class'})) {
- Carp::croak "Couldn't setup the authentication realm named '$realmname', no class defined";
+
+ # use the Null store as a default
+ if( ! exists $config->{store}{class} ) {
+ $config->{store}{class} = '+Catalyst::Plugin::Authentication::Store::Null';
+ $app->log->debug( qq(No Store specified for realm "$realmname", using the Null store.) );
}
-
- $config->{store}{class} ||= '+Catalyst::Plugin::Authentication::Store::Null';
-
- # use the
my $storeclass = $config->{'store'}{'class'};
## follow catalyst class naming - a + prefix means a fully qualified class, otherwise it's
} else {
$storeclass = $1;
}
-
# a little niceness - since most systems seem to use the password credential class,
# if no credential class is specified we use password.
my $res = $self->store->find_user($authinfo, $c);
if (!$res) {
- if ($self->config->{'auto_create'} && $self->store->can('auto_create') ) {
- $res = $self->store->auto_create($authinfo, $c);
+ if ($self->config->{'auto_create_user'} && $self->store->can('auto_create_user') ) {
+ $res = $self->store->auto_create_user($authinfo, $c);
}
- } elsif ($self->config->{'auto_update'} && $self->store->can('auto_update')) {
- $res = $self->store->auto_update($authinfo, $c, $res);
+ } elsif ($self->config->{'auto_update_user'} && $self->store->can('auto_update_user')) {
+ $res = $self->store->auto_update_user($authinfo, $c, $res);
}
return $res;