You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Kai <ve...@kokai.net> on 2004/01/08 16:27:37 UTC
About Authenticate Dialog
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 Basic
> my $username = $r->user;
>
> if ($username eq '') {
> $r->note_basic_auth_failure;
> $r->log_error ("no account given for uri=<" . $r->uri . ">");
> return Apache::AUTH_REQUIRED;
> }
>
> # etc...
>
> return Apache::OK;
> }
Regards,
Kai
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
Re: About Authenticate Dialog
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
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 and docs listed on perl.apache.org
HTH
--Geoff
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html