From: Tomas Doran Date: Tue, 17 Nov 2009 22:11:25 +0000 (+0000) Subject: Tidy up Plugin::Auth section for current versions and best practices. Changelog X-Git-Tag: v0.32~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Model-DBIC-Schema.git;a=commitdiff_plain;h=10c73a308630dc5c933868e4470016bfd18e450f Tidy up Plugin::Auth section for current versions and best practices. Changelog --- diff --git a/Changes b/Changes index 2a87f9c..6506e84 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,10 @@ Revision history for Perl extension Catalyst::Model::DBIC::Schema + - Move documentation on setting up authentication into its own section + for clarity. + - Other misc documentation enhancements to make the docs more clear + about the important things to know. + - Convert Authentication Plugin configuration example to new style. 0.30 Sun Oct 18 01:35:36 EDT 2009 - change no sources error to a warning (with a way to turn it off) diff --git a/lib/Catalyst/Model/DBIC/Schema.pm b/lib/Catalyst/Model/DBIC/Schema.pm index 7545f65..c2d51c7 100644 --- a/lib/Catalyst/Model/DBIC/Schema.pm +++ b/lib/Catalyst/Model/DBIC/Schema.pm @@ -639,26 +639,24 @@ L in MyApp.pm: ... - __PACKAGE__->config->{authentication} = - { + __PACKAGE__->config('Plugin::Authentication' => + { default_realm => 'members', - realms => { - members => { - credential => { - class => 'Password', - password_field => 'password', - password_type => 'hashed' - password_hash_type => 'SHA-256' - }, - store => { - class => 'DBIx::Class', - user_model => 'DB::User', - role_relation => 'roles', - role_field => 'rolename', - } + members => { + credential => { + class => 'Password', + password_field => 'password', + password_type => 'hashed' + password_hash_type => 'SHA-256' + }, + store => { + class => 'DBIx::Class', + user_model => 'DB::User', + role_relation => 'roles', + role_field => 'rolename', } } - }; + }); =head1 SEE ALSO