updated manual
[catagits/Catalyst-Manual.git] / lib / Catalyst / Manual / Tutorial / Authentication.pod
index 673a93d..8c24726 100644 (file)
@@ -50,6 +50,16 @@ L<Appendices|Catalyst::Manual::Tutorial::Appendices>
 =back
 
 
+=head1 IMPORTANT NOTE
+
+Since this tutorial was written, there has been a new Authentication
+API released (Catalyst::Plugin::Authentication version 0.1 and later).
+Some of this tutorial does not work with this API, and requires
+minimal changes.  For an example application that uses the new API see
+L<http://dev.catalyst.perl.org/repos/Catalyst/trunk/examples/NewAuthApp/NewAuthApp-0.01.tar.gz>. It
+is recommended that you read this tutorial first, and then download
+the source code linked above to understand the differences.
+
 =head1 DESCRIPTION
 
 Now that we finally have a simple yet functional application, we can
@@ -447,7 +457,8 @@ Then update it to match:
         # If the username and password values were found in form
         if ($username && $password) {
             # Attempt to log the user in
-            if ($c->login($username, $password)) {
+            if ($c->authenticate({ username => $username, 
+                                   password => $password} )) {
                 # If successful, then let them use the application
                 $c->response->redirect($c->uri_for('/books/list'));
                 return;
@@ -462,11 +473,11 @@ Then update it to match:
     }
 
 This controller fetches the C<username> and C<password> values from the
-login form and attempts to perform a login.  If successful, it redirects
-the user to the book list page.  If the login fails, the user will stay
-at the login page but receive an error message.  If the C<username> and
-C<password> values are not present in the form, the user will be taken
-to the empty login form.
+login form and attempts to authenticate the user.  If successful, it 
+redirects the user to the book list page.  If the login fails, the user 
+will stay at the login page but receive an error message.  If the 
+C<username> and C<password> values are not present in the form, the 
+user will be taken to the empty login form.
 
 Note that we could have used something like C<sub default :Private>; 
 however, the use of C<default> actions is discouraged because it does