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;fp=lib%2FCatalyst%2FManual%2FTutorial%2FAuthentication.pod;h=54cca78ff4bf62b70e189172112662dfaad734ff;hp=d8c4978c54262b85030765b5894b5384bf134d17;hb=0416017e10f523ec522ef48e0acef28217b57b55;hpb=4e1c81079691f91c7ab2c3b65ba0d981af660e04 diff --git a/lib/Catalyst/Manual/Tutorial/Authentication.pod b/lib/Catalyst/Manual/Tutorial/Authentication.pod index d8c4978..54cca78 100644 --- a/lib/Catalyst/Manual/Tutorial/Authentication.pod +++ b/lib/Catalyst/Manual/Tutorial/Authentication.pod @@ -392,7 +392,8 @@ definition of C to match: if ($c->authenticate({ username => $username, password => $password } )) { # If successful, then let them use the application - $c->response->redirect($c->uri_for('/books/list')); + $c->response->redirect($c->uri_for( + $c->controller('Books')->action_for('list'))); return; } else { # Set an error message @@ -524,69 +525,14 @@ the following method: return 1; } - -B Catalyst provides a number of different types of actions, -such as C, C, C, C and C. You -should refer to L for a more -detailed explanation, but the following bullet points provide a quick -introduction: - -=over 4 - -=item * - -In the past, the majority of applications have traditionally used -C actions for items that respond to user requests and -C actions for those that do not directly respond to user -input. - -=item * - -As discussed in Part 4 of the tutorial, newer Catalyst applications -tend to use the Chained dispatch form of action types because of its -power and flexibility. See -L -and -L -for more information on chained actions. - -=item * - -C actions provide a limited subset of what can be found done -with Chained actions. You can match on different portions of the URI -(for example C in C would -match on the URL C but -C would match on C). You -can also specify the number of arguments to match via C much -like the endpoint of a chain. However, becaused Chained actions offer -these features and so much more (at the expense of some additional -complexity), Chained action types are generally recommened. - -=item * - -There are five types of build-in C actions: C, C, -C, C, and C. - -=item * - -With C, C, C, C private actions, only the -most specific action of each type will be called. For example, if you -define a C action in your controller it will I a -C action in your application/root controller -- I the -action in your controller will be called. - -=item * - -Unlike the other actions where only a single method is called for each -request, I auto action along the chain of namespaces will be -called. Each C action will be called I. - -=back - -By placing the authentication enforcement code inside the C method -of C (or C), it will be -called for I request that is received by the entire application. +As discussed in +L, +every C method from the application/root controller down to the +most specific controller will be called. By placing the +authentication enforcement code inside the C method of +C (or C), it will be +called for I request that is received by the entire +application. =head2 Displaying Content Only to Authenticated Users @@ -655,7 +601,7 @@ bottom (below the closing tag):

Login - Create + Create

Reload your browser and you should now see a "Login" and "Create" links @@ -820,7 +766,7 @@ has changed): $c->flash->{status_msg} = "Book deleted"; # Redirect the user back to the list page - $c->response->redirect($c->uri_for('/books/list')); + $c->response->redirect($c->uri_for($self->action_for('list'))); } Next, open C and update the TT code to pull from