X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Manual.git;a=blobdiff_plain;f=lib%2FCatalyst%2FManual%2FTutorial%2F05_Authentication.pod;h=1b6078f9c65a01068b9c152fef709fb5743e62e7;hp=024a9f94156b216f96ef3a71c5cde425ee04b10d;hb=080bb6202ae1dc9a786bb32afcb391f542c2f0fc;hpb=b6e53c1ca5bfa271bfce99e0f42a56c8fd4df4be diff --git a/lib/Catalyst/Manual/Tutorial/05_Authentication.pod b/lib/Catalyst/Manual/Tutorial/05_Authentication.pod index 024a9f9..1b6078f 100644 --- a/lib/Catalyst/Manual/Tutorial/05_Authentication.pod +++ b/lib/Catalyst/Manual/Tutorial/05_Authentication.pod @@ -2,7 +2,6 @@ Catalyst::Manual::Tutorial::05_Authentication - Catalyst Tutorial - Chapter 5: Authentication - =head1 OVERVIEW This is B for the Catalyst tutorial. @@ -68,7 +67,6 @@ of the Tutorial Virtual machine (one subdirectory per chapter). There are also instructions for downloading the code in L. - =head1 BASIC AUTHENTICATION This section explores how to add authentication logic to a Catalyst @@ -80,7 +78,7 @@ application. First, we add both user and role information to the database (we will add the role information here although it will not be used until the authorization section, Chapter 6). Create a new SQL script file by -opening C in your editor and insert: +opening F in your editor and insert: -- -- Add users and role tables, along with a many-to-many join table @@ -117,7 +115,7 @@ opening C in your editor and insert: INSERT INTO user_role VALUES (2, 1); INSERT INTO user_role VALUES (3, 1); -Then load this into the C database with the following command: +Then load this into the F database with the following command: $ sqlite3 myapp.db < myapp02.sql @@ -142,7 +140,7 @@ for us: Author.pm BookAuthor.pm Book.pm Role.pm User.pm UserRole.pm Notice how the helper has added three new table-specific Result Source -files to the C directory. And, more +files to the F directory. And, more importantly, even if there were changes to the existing result source files, those changes would have only been written above the C<# DO NOT MODIFY THIS OR ANYTHING ABOVE!> comment and your hand-edited @@ -157,7 +155,7 @@ and C relationships for the new User, UserRole, and Role tables. However, as a convenience for mapping Users to their assigned roles (see L), we will also manually add a C relationship. Edit -C add the following information between +F add the following information between the C<# DO NOT MODIFY THIS OR ANYTHING ABOVE!> comment and the closing C<1;>: @@ -178,9 +176,9 @@ B Books to Authors, here we are only adding the convenience C in the Users to Roles direction. Note that we do not need to make any change to the -C schema file. It simply tells DBIC to load all of +F schema file. It simply tells DBIC to load all of the Result Class and ResultSet Class files it finds below the -C directory, so it will automatically pick up our new +F directory, so it will automatically pick up our new table information. @@ -188,14 +186,14 @@ table information. We aren't ready to try out the authentication just yet; we only want to do a quick check to be sure our model loads correctly. Assuming that you -are following along and using the "-r" option on C, +are following along and using the "-r" option on F, then the development server should automatically reload (if not, press C to break out of the server if it's running and then enter -C