[Catalyst-commits] r10727 - in Catalyst-Plugin-Authentication/0.10000/trunk: . lib/Catalyst/Plugin

t0m at dev.catalyst.perl.org t0m at dev.catalyst.perl.org
Mon Jun 29 16:55:36 GMT 2009


Author: t0m
Date: 2009-06-29 16:55:35 +0000 (Mon, 29 Jun 2009)
New Revision: 10727

Modified:
   Catalyst-Plugin-Authentication/0.10000/trunk/Changes
   Catalyst-Plugin-Authentication/0.10000/trunk/lib/Catalyst/Plugin/Authentication.pm
Log:
Fix issue if you have auth store plugins before authentication plugin

Modified: Catalyst-Plugin-Authentication/0.10000/trunk/Changes
===================================================================
--- Catalyst-Plugin-Authentication/0.10000/trunk/Changes	2009-06-29 16:54:55 UTC (rev 10726)
+++ Catalyst-Plugin-Authentication/0.10000/trunk/Changes	2009-06-29 16:55:35 UTC (rev 10727)
@@ -1,5 +1,10 @@
 Revision history for Perl extension Catalyst::Plugin::Authentication
 
+      - Make auth_realms method ensure authentication is initialized
+        before calling methods which get created during auth initialization.
+        Fixes back compat cases where auth store is in the plugin list
+        before the authentication plugin. (t0m)
+
 0.10013 Fri Jun 19 16:08:00 BST 2009
       - Add a username_field config item to ::Credential::Remote
         (Nigel Metheringham)

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-29 16:54:55 UTC (rev 10726)
+++ Catalyst-Plugin-Authentication/0.10000/trunk/lib/Catalyst/Plugin/Authentication.pm	2009-06-29 16:55:35 UTC (rev 10727)
@@ -342,14 +342,13 @@
 
 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};
-    
 }
 
 




More information about the Catalyst-commits mailing list