Dear All, I'm trying to use htpasswd file for my application for authentication. I created htpasswd file using htpasswd command. e.g htpasswd -c htpasswd rohan
Then I moved the file to my application directory "/home/rohanm/Apps/myapp/ But I'm getting following error when I try to authenticate user. "Can't locate object method "get_user" via package "Catalyst::Plugin::Authentication::Store::Htpasswd" at /usr/local/share/perl/5.10.1/Catalyst/Authentication/Realm.pm line 123." FYI The myapp.pm file look like - use Catalyst qw/ -Debug StackTrace ConfigLoader Static::Simple Authentication /; __PACKAGE__->config('Plugin::Authentication' => { default => { credential => { class => 'Password', password_field => 'password', password_type => 'clear', }, store => { class => 'Htpasswd', file => '/home/rma/Apps/myapp/.htpasswd', } } } ); and I've a method in controller to call the authenticate function as below. sub login : Global Form { my ($self, $c) = @_; my $form = $self->formbuilder; return unless $form->submitted && $form->validate; if($c->authenticate({username => $form->field('username'),password => $form->field('password')})) { $c->flash->{message} = 'Logged in successfully.'; } else { $c->stash->{error} = 'Login failed.'; } } Please let me know if I'm missing on something. Regards, Rohan Mallelwar
_______________________________________________ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/