Skip Menu |

This queue is for tickets about the Catalyst-Authentication-Credential-HTTP CPAN distribution.

Report information
The Basics
Id: 39838
Status: resolved
Priority: 0/
Queue: Catalyst-Authentication-Credential-HTTP

People
Owner: bobtfish [...] bobtfish.net
Requestors: gstead [...] ieee.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.005
Fixed in: 1.006



Subject: is the current SYNOPSYS accurate?
Hello Tomas, I want to say that Catalyst-Authentication-Credential-HTTP is a cool idea! I am also really sorry to write to you, but unfortunately I have spent several hours with it and still cannot make it run. I use the directions in the SYNOPSIS and but keep getting auth-related errors. 1) I begin with a new project: catalyst.pl HttpAuthTest 2) Then I update lib/HttpAuthTest.pm per the instructions. 3) Then I add: $c->authenticate({ realm => "example" }); to ./lib/HttpAuthTest/Controller/Root.pm 4) When I browse to the controller I get the following error: Caught exception in HttpAuthTest::Controller::Root->index "authenticate called with nonexistant realm: 'default'. at /home/gstead/programming/perl/playdir/HttpAuthTest/script/../lib/HttpAuthTest/Controller/Root.pm line 33" I have attached my Catalyst project so you can see what I mean. I hope this can help myself and others who are using your cool module. thanks! -Graham 5) Here is the other information CPAN says you need: 5.1) I use Catalyst 5.7014 and C:A:C:HTTP 1.005 on Linux. 5.2) slim HttpAuthTest # perl -v This is perl, v5.8.8 built for x86_64-linux 5.3) slim HttpAuthTest # uname -a Linux slim 2.6.25-gentoo-r7 #1 SMP Mon Sep 8 09:49:16 PDT 2008 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 5400+ AuthenticAMD GNU/Linux
Subject: httpauthtest.zip
Download httpauthtest.zip
application/x-zip-compressed 48.8k

Message body not shown because it is not plain text.

Hi Graham, nice to hear from you. I'm sorry that you're having so many problems with the module, and thanks for persevereing. I guess that the problem is down to configuration / setup. I am successfully using the module in production at the moment. I'll have a peek at your code tonight when I get in from work, and give you a more detailed analysis.
From: gstead [...] ieee.org
Thank you Tomas, I really appreciate any help you can provide. best regards, -Graham
Here are the changes required to make your application work: diff -ur HttpAuthTest/lib/HttpAuthTest.pm HttpAuthTest.t0m/lib/HttpAuthTest.pm --- HttpAuthTest/lib/HttpAuthTest.pm 2008-10-06 14:14:51.000000000 +0100 +++ HttpAuthTest.t0m/lib/HttpAuthTest.pm 2008-10-06 18:38:34.000000000 +0100 @@ -32,11 +32,12 @@ __PACKAGE__->config( name => 'HttpAuthTest' ); __PACKAGE__->config( authentication => { + default_realm => 'example', realms => { example => { credential => { class => 'HTTP', - type => 'any', # or 'digest' or 'basic' + type => 'basic', # or 'digest' or 'basic' password_type => 'clear', password_field => 'password' }, As noted in the synopsis: # Note that the authentication realm sent to the client is overridden # here, but this does not affect the Catalyst::Authentication::Realm # used for authentication. But I also don't include the 'default_realm' key in the configuration in the synopsis... I've fixed that in subversion so that the config in the synopsis should now work. If you have any other suggestions about how I can make the difference between realms in Catalyst::Plugin::Authentication and the 'realm' field sent by my plugin more clean, then I'd love to hear them?
I've just pushed 1.006 to CPAN which should (hopefully) make the documentation more clear. Please do let me know if you have any further suggestions however!
From: gstead [...] ieee.org
Hi Tomas, This is really great, thank you. I am successfully using the package now and it's working great in a skeleton application. I am integrating it into some production code and will let you know if I have any difficulties and/or suggestions. Thanks for your help! -Graham