X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FPlugin%2FAuthentication.pm;h=91ac80b900308b1012a435653774f3f25a15f045;hb=3fd45491a40674b1913fe9fb9dbb33bb1210acdb;hp=30cdaa39de6b01e3eafc681bdc0c938758c05a0c;hpb=2537faeb491f176649da2baf7ce4d7535ef1cacc;p=catagits%2FCatalyst-Plugin-Authentication.git diff --git a/lib/Catalyst/Plugin/Authentication.pm b/lib/Catalyst/Plugin/Authentication.pm index 30cdaa3..91ac80b 100644 --- a/lib/Catalyst/Plugin/Authentication.pm +++ b/lib/Catalyst/Plugin/Authentication.pm @@ -12,7 +12,7 @@ use Tie::RefHash; use Class::Inspector; use Catalyst::Authentication::Realm; -our $VERSION = "0.10012"; +our $VERSION = "0.10013"; sub set_authenticated { my ( $c, $user, $realmname ) = @_; @@ -165,10 +165,10 @@ sub find_realm_for_persisted_user { } else { ## we have no choice but to ask each realm whether it has a persisted user. foreach my $realmname (@{$c->_auth_realm_restore_order}) { - my $ret = $c->auth_realms->{$realmname}->user_is_restorable($c); - if ($ret) { - return $c->auth_realms->{$realmname}; - } + my $realm = $c->auth_realms->{$realmname} + || Catalyst::Exception->throw("Could not find authentication realm '$realmname'"); + return $realm + if $realm->user_is_restorable($c); } } return undef; @@ -342,14 +342,13 @@ sub setup_auth_realm { sub auth_realms { my $self = shift; + $self->_authentication_initialize(); # Ensure _auth_realms created! return($self->_auth_realms); } sub get_auth_realm { my ($app, $realmname) = @_; - return $app->auth_realms->{$realmname}; - } @@ -1113,7 +1112,11 @@ Jess Robinson David Kamholz -Tomas Doran (t0m), C +Tomas Doran (t0m), C + +kmx + +Nigel Metheringham =head1 COPYRIGHT & LICENSE