From: Rafael Kitover Date: Fri, 29 May 2009 15:54:43 +0000 (+0000) Subject: update docs X-Git-Tag: v0.26~16 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Model-DBIC-Schema.git;a=commitdiff_plain;h=6f6b9c2d65da83bd1a2be43edd9b2de1e856a155 update docs --- diff --git a/lib/Catalyst/Model/DBIC/Schema.pm b/lib/Catalyst/Model/DBIC/Schema.pm index d3807bc..8095f05 100644 --- a/lib/Catalyst/Model/DBIC/Schema.pm +++ b/lib/Catalyst/Model/DBIC/Schema.pm @@ -90,19 +90,34 @@ be used/accessed in the normal Catalyst manner, via $c->model(): my $actor = $c->model('FilmDB::Actor')->find(1); You can also use it to set up DBIC authentication with -Authentication::Store::DBIC in MyApp.pm: +L in MyApp.pm: package MyApp; - use Catalyst qw/... Authentication::Store::DBIC/; + use Catalyst qw/... Authentication .../; ... - __PACKAGE__->config->{authentication}{dbic} = { - user_class => 'FilmDB::Actor', - user_field => 'name', - password_field => 'password' - } + __PACKAGE__->config->{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', + } + } + } + }; C<< $c->model('Schema::Source') >> returns a L for the source name parameter passed. To find out more about which methods can @@ -353,12 +368,12 @@ C. =head2 _default_cursor_class -What to rest your L if a custom one +What to reset your L to if a custom one doesn't work out. Defaults to L. =head2 _traits -Unresolved arrayref of traits passed at C time. +Unresolved arrayref of traits passed in the config. =head2 _resolved_traits