[Catalyst] Installing Catalyst::Authentication::Store::DBIx::Class
Breaks Catalyst
Collin Condray
ccondray at gmail.com
Wed Apr 8 11:59:42 GMT 2009
Thanks everyone for their quick responses to my issue. Between upgrading to
the latest version of Catalyst and commenting out all references to the
Authentication module I can get the vast majority of the site's
functionality working which is good enough for my immediate purposes. I've
also updated DBIx::Class, Class::C3 and
Class::C3::XS as suggested. So now, my issue is no longer urgent just
puzzling.
As J. has requested here are the relevant parts of my configuration files:
myapp.pm
use Catalyst (
#'-Debug',
'ConfigLoader',
'Static::Simple',
'StackTrace',
'Session',
'Session::Store::FastMmap',
'Session::State::Cookie',
'Authentication',
'Authorization::Roles',
'Authorization::ACL',
'RequireSSL',
'Email',
'CustomErrorMessage',
our $VERSION =3D '0.01';
__PACKAGE__->config( name =3D> 'myapp' );
# Start the application
__PACKAGE__->setup;
# Authorization::ACL Rules
__PACKAGE__->deny_access_unless( "/admin", [qw/admin/], );
and myapp.conf
name myapp
<authentication>
default_realm dbic
<realms>
<dbic>
<credential>
# Note this first definition would be the same as setting
# __PACKAGE__->config->{authentication}->{realms}->{dbic}
# ->{credential} =3D 'Password' in lib/myapp.pm
#
# Specify that we are going to do password-based auth
class Password
# This is the name of the field in the users table with the
# password stored in it
password_field password
# Switch to more secure hashed passwords
#password_type clear
password_type hashed
# Use the SHA-1 hashing algorithm
password_hash_type SHA-1
</credential>
<store>
# Use DBIC to retrieve username, password & role information
class DBIx::Class
# This is the model object created by Catalyst::Model::DBIC
# from your schema (you created 'myapp::Schema::User' but as
# the Catalyst startup debug messages show, it was loaded as
# 'myapp::Model::DB::Users').
# NOTE: Omit 'myapp::Model' here just as you would when
using
# '$c->model("DB::Users)'
user_class myappDB::Users
# This is the name of a many_to_many relation in the users
# object that points to the roles for that user
role_relation roles
# This is the name of field in the roles table that contains
# the role information
role_field role
</store>
</dbic>
</realms>
</authentication>
The main exception to the tutorial method is that I'm using an email address
as the user name rather than a username field.
The error message that is now showing up in my logs is: "No Store specified
for realm "dbic", using the Null store."
Thanks again for the responses. Again, please let me know if there's any
other information I can provide.
Collin Condray
condray.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20090408/70d5a=
712/attachment.htm
More information about the Catalyst
mailing list