X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Manual.git;a=blobdiff_plain;f=lib%2FCatalyst%2FManual%2FTutorial%2FAuthentication.pod;h=8c247262dfd5ef19116deba708c8abc01e97211b;hp=673a93dc12f4b1f93e3e5f246c213d74a5228904;hb=2d0526d162eaee76807a5f7534820429c0395a03;hpb=6d0971ad6e54665ea8c239499e715a64fe1b83ca diff --git a/lib/Catalyst/Manual/Tutorial/Authentication.pod b/lib/Catalyst/Manual/Tutorial/Authentication.pod index 673a93d..8c24726 100644 --- a/lib/Catalyst/Manual/Tutorial/Authentication.pod +++ b/lib/Catalyst/Manual/Tutorial/Authentication.pod @@ -50,6 +50,16 @@ L =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. 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 and C 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 and -C 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 and C 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; however, the use of C actions is discouraged because it does