Auth 0.03, user_exists and a few pod fixes
[catagits/Catalyst-Plugin-Authentication.git] / lib / Catalyst / Plugin / Authentication.pm
index 336438b..c7549c9 100644 (file)
@@ -20,7 +20,7 @@ use Class::Inspector;
 #      constant->import(have_want => eval { require Want });
 #}
 
-our $VERSION = "0.02";
+our $VERSION = "0.03";
 
 sub set_authenticated {
     my ( $c, $user ) = @_;
@@ -78,6 +78,8 @@ sub logout {
     {
         delete @{ $c->session }{qw/__user __user_store/};
     }
+    
+    $c->NEXT::logout(@_);
 }
 
 sub get_user {
@@ -214,13 +216,21 @@ authentication framework.
 
 =head1 DESCRIPTION
 
-The authentication plugin provides generic user support. It is the basis for both authentication (checking the user is who they claim to be), and authorization (allowing the user to do what the system authorises them to do).
+The authentication plugin provides generic user support. It is the basis 
+for both authentication (checking the user is who they claim to be), and 
+authorization (allowing the user to do what the system authorises them to do).
 
-Using authentication is split into two parts. A Store is used to actually store the user information, and can store any amount of data related to the user. Multiple stores can be accessed from within one application. Credentials are used to verify users, using the store, given data from the frontend.
+Using authentication is split into two parts. A Store is used to actually 
+store the user information, and can store any amount of data related to 
+the user. Multiple stores can be accessed from within one application. 
+Credentials are used to verify users, using the store, given data from 
+the frontend.
 
-To implement authentication in a catalyst application you need to add this module, plus at least one store and one credential module.
+To implement authentication in a catalyst application you need to add this 
+module, plus at least one store and one credential module.
 
-Authentication data can also be stored in a session, if the application is using the L<Catalyst::Plugin::Session> module.
+Authentication data can also be stored in a session, if the application 
+is using the L<Catalyst::Plugin::Session> module.
 
 =head1 METHODS
 
@@ -246,7 +256,7 @@ If you're just going to say
        }
 
 it should be more efficient than C<<$c->user>> when a user is marked in the session
-but C<<$c->user>> hasn't been called yet.
+but C<< $c->user >> hasn't been called yet.
 
 =item logout
 
@@ -265,7 +275,26 @@ Fetch a particular users details, defined by the given ID, via the default store
 =item use_session
 
 Whether or not to store the user's logged in state in the session, if the
-application is also using the L<Catalyst::Plugin::Session> plugin.
+application is also using the L<Catalyst::Plugin::Session> plugin. This 
+value is set to true per default.
+
+=item store
+
+If multiple stores are being used, set the module you want as default here.
+
+=item stores
+
+If multiple stores are being used, you need to provide a name for each store
+here, as a hash, the keys are the names you wish to use, and the values are
+the the names of the plugins.
+
+ # example
+ __PACKAGE__->config( authentication => {
+                        store => 'Catalyst::Plugin::Authentication::Store::HtPasswd',
+                        stores => { 
+                           'dbic' => 'Catalyst::Plugin::Authentication::Store::DBIC'
+                                  }
+                                         });
 
 =back
 
@@ -349,10 +378,14 @@ L<Catalyst::Plugin::Authentication::Store::Minimal>,
 L<Catalyst::Plugin::Authorization::ACL>,
 L<Catalyst::Plugin::Authorization::Roles>.
 
-=head1 AUTHOR
+=head1 AUTHORS
 
 Yuval Kogman, C<nothingmuch@woobling.org>
 
+Jess Robinson
+
+David Kamholz
+
 =head1 COPYRIGHT & LICNESE
 
         Copyright (c) 2005 the aforementioned authors. All rights