From: Tomas Doran Date: Mon, 29 Jun 2009 16:55:35 +0000 (+0000) Subject: Fix issue if you have auth store plugins before authentication plugin X-Git-Tag: v0.10014~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Plugin-Authentication.git;a=commitdiff_plain;h=3fd45491a40674b1913fe9fb9dbb33bb1210acdb Fix issue if you have auth store plugins before authentication plugin --- diff --git a/Changes b/Changes index 56eb2ea..6550ecc 100644 --- a/Changes +++ b/Changes @@ -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) diff --git a/lib/Catalyst/Plugin/Authentication.pm b/lib/Catalyst/Plugin/Authentication.pm index ca0c425..91ac80b 100644 --- a/lib/Catalyst/Plugin/Authentication.pm +++ b/lib/Catalyst/Plugin/Authentication.pm @@ -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}; - }