From: Yuval Kogman Date: Sun, 27 Nov 2005 14:12:11 +0000 (+0000) Subject: Allow plugins loaded after C::P::Authentication to hook into 'set_authenticated' X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=033d2c24c55e408b5a471ce4bdd57e5bdc1bfd24;p=catagits%2FCatalyst-Plugin-Authentication.git Allow plugins loaded after C::P::Authentication to hook into 'set_authenticated' --- diff --git a/lib/Catalyst/Plugin/Authentication.pm b/lib/Catalyst/Plugin/Authentication.pm index 9c61bf8..7887cad 100644 --- a/lib/Catalyst/Plugin/Authentication.pm +++ b/lib/Catalyst/Plugin/Authentication.pm @@ -29,6 +29,8 @@ sub set_authenticated { { $c->save_user_in_session($user); } + + $c->NEXT::set_authenticated( $user ); } sub user { @@ -84,7 +86,6 @@ sub prepare { my $c = shift->NEXT::prepare(@_); if ( $c->isa("Catalyst::Plugin::Session") - and $c->default_auth_store and !$c->user ) { if ( $c->sessionid and my $frozen_user = $c->session->{__user} ) { @@ -180,7 +181,8 @@ __END__ =head1 NAME -Catalyst::Plugin::Authentication - +Catalyst::Plugin::Authentication - Infrastructure plugin for the Catalyst +authentication framework. =head1 SYNOPSIS @@ -195,7 +197,8 @@ Catalyst::Plugin::Authentication - The authentication plugin is used by the various authentication and authorization plugins in catalyst. -It defines the notion of a logged in user, and provides integration with the +It defines the notion of a logged in user, and provides integration with the +L plugin, =head1 METHODS