Kai wrote:
> Hi List,
> I am a newbie.
> I don't know howto invoke the following subroutine to complete
> authenticate.
> Would you give me a whole sample?
see recipe 13.3 in the mod_perl developer's cookbook
http://www.modperlcookbook.org/chapters/ch13.pdf
as well as the many other books a
Hi List,
I am a newbie.
I don't know howto invoke the following subroutine to complete
authenticate.
Would you give me a whole sample?
Thanx a lot !
> sub handler {
> my ($r) = shift;
>
> my ($res, $password) = ($r->get_basic_auth_pw);
> return $res if $res;#decline if not B
Kai wrote:
> Hi List,
> I am going to write a HTTP authentication by using mod_perl.
> Now,if I open this script,the brower will pop a authenticate box.
> I want to know,how can I get the id and password that the client inputed in
> that authenticate box .
> Would someone give any advice ?
In mod_perl 2:
sub handler {
my ($r) = shift;
my ($res, $password) = ($r->get_basic_auth_pw);
return $res if $res;#decline if not Basic
my $username = $r->user;
if ($username eq '') {
$r->note_basic_auth_failure;
$r->log_error ("no account given for uri=<" .
Hi List,
I am going to write a HTTP authentication by using mod_perl.And I wrote
some code like the following:
---
#!/usr/bin/perl -w
use CGI;
my $p=new CGI;
print $p->header(-status=>401,
-www_authenticate='Basic realm="test area"',
-type=>'text/ht