Hi Cees
(1)
Here's how I'm calling CAP::Authentication in my cgiapp_init():
$self -> authen() -> config
(
CREDENTIALS => [qw/username password/],
DRIVER =>
[
'DBI',
CONSTRAINTS =>
{
'staff.username' =>
'__CREDENTIAL_1__',
'sha1:staff.password' => '__CREDENTIAL_2__',
},
DBH => $self -> param('dbh'),
TABLE => 'staff',
],
POST_LOGIN_RUNMODE => 'display',
STORE => 'Session',
);
$self -> authen() -> protected_runmodes(':all');
(2)
When my app starts, I get this msg in Apache's error.log file:
[Fri Jun 09 15:07:07 2006] [error] [client 127.0.0.1] Color::Calc is required
when specifying a custom BASE_COLOUR, and leaving LIGHTER_COLOUR, LIGHT_COLOUR,
DARK_COLOUR or DARKER_COLOUR blank or when providing percentage based colour at
d:/Perl/site/lib/CGI/Application/Plugin/Authentication.pm line 1357., referer:
http://127.0.0.1/cgi-bin/menu.cgi
I'm not explicitly using color in any way, so I'm getting the warning /by
default/!
No big deal, but it would be nice to not have that msg. I don't have Color::Calc
installed.
(3)
You module displays a nice log in form, which I fill in.
After I click your Sign in button, my app's first screen appears.
Then when I click a submit button, the app dies with:
[Fri Jun 09 15:08:18 2006] [error] [client 127.0.0.1] Error executing run mode
'authen_login': Undefined subroutine &CGI::start_html called at
d:/Perl/site/lib/CGI/Application/Plugin/Authentication.pm line 1641.\r, referer:
http://127.0.0.1/cgi-bin/aussi/aussi.cgi
Now lines 1641 to 1645 are:
$html = join( "\n",
CGI::start_html( -title => $login_options->{TITLE} || 'Sign In' ),
$authen->login_box,
CGI::end_html(),
);
So there several problems here:
(a) Why is it calling this code? I ought to be logged in, but there's nothing in
the sessions table to indicate that I am
(b) You don't do use or require CGI. Yes, I do have it installed :-).
(c) I don't /want/ to use CGI. I use CGI::Simple as in:
sub cgiapp_get_query
{
my($self) = @_;
return CGI::Simple -> new();
} # End of cgiapp_get_query.
so methinks your CGI code should have tried something like $cgiapp -> query() ->
start_html().
That would not work with CGI::Simple, though :-).
(4)
I certainly do have time available to help debug your module, but it's 3:30 pm
on a Friday here now...
--
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[email protected]/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]