Hi Zbigniew, You are correct. I made some last-minute changes to the config options and neglected to update the doc. Shame on me.
A 0.1081 is on it's way to CPAN. You need to specify the model name that represents a user. The config field is 'user_model' (was user_class.) And re: EncodedColumn - the SimpleDB provides an interface to what is already available via the Password credential. That allows any Digest::* module to be used for encoding of passwords, so we piggyback on that functionality. Or am I misunderstanding what you were suggesting? Jay On Oct 27, 2008, at 7:24 AM, Zbigniew Lukasiak wrote:
Hi, I've looked at the documentation: The SimpleDB Realm class configures the Catalyst authentication system based on the following: * Your user data is stored in a table that is accessible via $c->model('User'); * Your passwords are stored in the 'password' field in your users table and are not encrypted. * Your roles for users are stored in a separate table and are directly accessible via a DBIx::Class relationship called 'roles' and the text of the role is stored in a field called 'role' within the role table. * Your user information is stored in the session once the user is authenticated. For the above usage, only one configuration option is necessary, 'user_class'. user_class should contain the class name of your user class. See the "PREPARATION" section for info on how to set up your database for use with this module. There seems to be some mismatch there - in the first point above you mention that there is a default user class - 'User' - but then you say that user_class is a required config option. Or maybe I am mistaken? It is not clear what really the first point above means. Another question - have you thought about using http://search.cpan.org/~groditi/DBIx-Class-EncodedColumn-0.00002/lib/DBIx/Class/EncodedColumn.pm (or the older DigestColumn) to simplify the interface? Cheers, Zbigniew On Mon, Oct 27, 2008 at 1:36 AM, Jason Kuri <[EMAIL PROTECTED]> wrote:Hey all, Catalyst authentication configuration just got a whole lot easier. I just released two updates to CPAN that will make Auth configuration much much easier for the 'average' case where you have user data stored in an SQL database and you are using passwords for authentication. Now, the 'basic' config using plaintext passwords looks like this: __PACKAGE__->config->{'Plugin::Authentication'} = { default => { class => 'SimpleDB', user_class => 'MyApp::User', } } For the 'basic' config using a hashed password - just a bit more complex: __PACKAGE__->config->{'Plugin::Authentication'} = { default => { class => 'SimpleDB', user_class => 'MyApp::User', password_type => 'hashed', password_hash_type => 'SHA1' } } Hopefully, people will not find this config overwhelming. :-) For those who are interested, the custom configuration is accomplished by using a custom Realm, SimpleDB, which is part of the most recent Catalyst::Authentication::Store::DBIx::Class dist. A lot of flexibility can be gained in configuration and functionality by creating custom Realms. This is just one example. The modules are available (or will be soon) at: http://search.cpan.org/~jayk/Catalyst-Authentication-Store-DBIx-Class-0.108/lib/Catalyst/Authentication/Realm/SimpleDB.pm ( A preview of the docs are available here: http://scsys.co.uk:8001/19881 ) and http://search.cpan.org/~jayk/Catalyst-Plugin-Authentication-0.10008/ If anyone has any questions or comments, please reply to this email, or find me on #catalyst. I am also soliciting anyone who is willing to take a crack at simplifying the Auth section of the Catalyst tutorial by using this module, as I think most users are looking to do exactly this type of config when they first approach Catalyst and are reading the Tutorial. Any volunteers? JayK _______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/-- Zbigniew Lukasiak http://brudnopis.blogspot.com/ http://perlalchemy.blogspot.com/ _______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
_______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
