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=f554a434c5d8c3d2eaed9326b586f4d7f453206e;hp=28e2501ad7fff3a4afa5b37585e228346f338c50;hb=f632e28b6412d80f4ada4c0bfe9141c03ea25988;hpb=4f8ea4b998626d5e94d2042783ce8e955e03d2a5 diff --git a/lib/Catalyst/Manual/Tutorial/Authentication.pod b/lib/Catalyst/Manual/Tutorial/Authentication.pod index 28e2501..f554a43 100644 --- a/lib/Catalyst/Manual/Tutorial/Authentication.pod +++ b/lib/Catalyst/Manual/Tutorial/Authentication.pod @@ -447,7 +447,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->authenticate($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 +463,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