[Catalyst-commits] r9206 -
trunk/Catalyst-Plugin-Authentication/lib/Catalyst/Authentication
jayk at dev.catalyst.perl.org
jayk at dev.catalyst.perl.org
Wed Feb 4 21:40:42 GMT 2009
Author: jayk
Date: 2009-02-04 21:40:41 +0000 (Wed, 04 Feb 2009)
New Revision: 9206
Modified:
trunk/Catalyst-Plugin-Authentication/lib/Catalyst/Authentication/Realm.pm
Log:
Adding failed_user_restore hook for bypassing the dead session problem
Modified: trunk/Catalyst-Plugin-Authentication/lib/Catalyst/Authentication/Realm.pm
===================================================================
--- trunk/Catalyst-Plugin-Authentication/lib/Catalyst/Authentication/Realm.pm 2009-02-04 20:10:28 UTC (rev 9205)
+++ trunk/Catalyst-Plugin-Authentication/lib/Catalyst/Authentication/Realm.pm 2009-02-04 21:40:41 UTC (rev 9206)
@@ -192,12 +192,21 @@
# this sets the realm the user originated in.
$user->auth_realm($self->name);
} else {
- Catalyst::Exception->throw("Store claimed to have a restorable user, but restoration failed. Did you change the user's id_field?");
+ $app->log->error("Store claimed to have a restorable user, but restoration failed. Did you change the user's id_field?");
+ $self->failed_user_restore($c);
}
return $user;
}
+## this occurs if there is a session but the thing the session refers to
+## can not be found. Do what you must do here.
+sub failed_user_restore {
+ my ($self, $c) = @_;
+
+ $self->remove_persisted_user($c);
+}
+
sub persist_user {
my ($self, $c, $user) = @_;
More information about the Catalyst-commits
mailing list