Catalyst::Manual::Tutorial::05_Authentication - Catalyst Tutorial - Chapter 5: Authentication
-
=head1 OVERVIEW
This is B<Chapter 5 of 10> for the Catalyst tutorial.
are also instructions for downloading the code in
L<Catalyst::Manual::Tutorial::01_Intro>.
-
=head1 BASIC AUTHENTICATION
This section explores how to add authentication logic to a Catalyst
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<myapp_server.pl>,
+are following along and using the "-r" option on F<myapp_server.pl>,
then the development server should automatically reload (if not, press
C<Ctrl-C> to break out of the server if it's running and then enter
-C<script/myapp_server.pl> to start it). Look for the three new model
+F<script/myapp_server.pl> to start it). Look for the three new model
objects in the startup debug output:
...
- .-------------------------------------------------------------------+----------.
+ .-------------------------------------------------------------------+----------.
| Class | Type |
+-------------------------------------------------------------------+----------+
| MyApp::Controller::Books | instance |
</Plugin::Authentication>
B<TIP:> Here is a short script that will dump the contents of
-C<MyApp->config> to L<Config::General> format in F<myapp.conf>:
+C<< MyApp->config >> to L<Config::General> format in F<myapp.conf>:
$ CATALYST_DEBUG=0 perl -Ilib -e 'use MyApp; use Config::General;
Config::General->new->save_file("myapp.conf", MyApp->config);'
$user->update;
}
-PassphraseColumn lets us simply call C<$user->check_password($password)>
+PassphraseColumn lets us simply call C<< $user->check_password($password) >>
to see if the user has supplied the correct password, or, as we show
-above, call C<$user->update($new_password)> to update the hashed
+above, call C<< $user->update($new_password) >> to update the hashed
password stored for this user.
Then run the following command:
token, it is ignored -- thereby keeping the state of our status/error
messages in sync with the users actions).
-
You can jump to the next chapter of the tutorial here:
L<Authorization|Catalyst::Manual::Tutorial::06_Authorization>
-
=head1 AUTHOR
Kennedy Clark, C<hkclark@gmail.com>