Hi,
i was writing my own AuthHandler with modperl v2 (v1.99_09).
Getting the Username/Password-Pair from an html-form (submit via post) and finally
checking it against an mysql-table works fine so far.
When the authentification have taken place.. the username should be reminded
in any way, so the user haven't to enter their password-info on every request... and
this is
what doesn't work in my code:
--- /usr/lib/perl5/site_perl/5.8.0/MyIntranet/AuthHandler
package Myintranet::AuthHandler;
use Apache::Const qw(OK FORBIDDEN AUTH_REQUIRED SERVER_ERROR);
use Apache::RequestRec;
use Apache::Connection;
use Apache::compat;
use Mysql;
use strict;
sub handler {
my $obj = shift;
return OK if ($obj->user);
my %params = $obj->content();
[..]
$obj->user($params{'user'});
return OK;
}
--- EOF
After having entered user/pass via html-form, this authentification does his job well,
but on the following request
(on same browser) $obj->user doesnt seem to return any value.. so this handler tries
to compare http post data (
which arent present this time) with userdata in mysql-table.. resulting in an
Auth_Required error.
Any logical misstake doing this way of "reauthorizing" .. or anything missing ?
Available documentation - modperl cookbook included - does it that way ...
Thanks for help/any hints!
F. Gey