[Catalyst-commits] r10517 - in
Catalyst-Plugin-Authentication/0.10000/trunk: . lib/Catalyst/Plugin
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Fri Jun 12 10:28:00 GMT 2009
Author: t0m
Date: 2009-06-12 10:27:58 +0000 (Fri, 12 Jun 2009)
New Revision: 10517
Modified:
Catalyst-Plugin-Authentication/0.10000/trunk/Changes
Catalyst-Plugin-Authentication/0.10000/trunk/lib/Catalyst/Plugin/Authentication.pm
Log:
Make error more useful
Modified: Catalyst-Plugin-Authentication/0.10000/trunk/Changes
===================================================================
--- Catalyst-Plugin-Authentication/0.10000/trunk/Changes 2009-06-12 09:00:11 UTC (rev 10516)
+++ Catalyst-Plugin-Authentication/0.10000/trunk/Changes 2009-06-12 10:27:58 UTC (rev 10517)
@@ -1,5 +1,8 @@
Revision history for Perl extension Catalyst::Plugin::Authentication
+ - Die with a useful error message if we are about to try to restore
+ a user from a realm which does not exist. (t0m)
+
0.10012 Sat Jun 6 10:58:43 BST 2009
- Add Catalyst::Authentication::Credential::Remote which authenticates you
directly from environment variables passed by your web server. This
Modified: Catalyst-Plugin-Authentication/0.10000/trunk/lib/Catalyst/Plugin/Authentication.pm
===================================================================
--- Catalyst-Plugin-Authentication/0.10000/trunk/lib/Catalyst/Plugin/Authentication.pm 2009-06-12 09:00:11 UTC (rev 10516)
+++ Catalyst-Plugin-Authentication/0.10000/trunk/lib/Catalyst/Plugin/Authentication.pm 2009-06-12 10:27:58 UTC (rev 10517)
@@ -165,10 +165,10 @@
} 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;
More information about the Catalyst-commits
mailing list