You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Robert Friberg <ro...@it-konsult.com> on 2000/10/07 09:11:39 UTC

simplest authorization possible, please

Hi all,

I'm not really that lazy, I could probably find out
pretty quickly from the excellent guide or the eagle 
book in my lap right now.

It's just that I'm way behind schedule for an application
thats due on monday :=) Any time saved will be greatly
appreciated, I promised my daughter a biketrip today.

Given this:


<Location /padm>
  SetHandler perl-script
  PerlHandler Apache::padm
</Location>


What is the fastest/simplest way to add basic authorization?
I'm comfortable with hardcoded usernames/passwords in a
handler for now.

Many, many thanks in advance.
--
robert friberg, ensofus ab


Re: simplest authorization possible, please

Posted by Chris Winters <cw...@intes.net>.
* Robert Friberg (robban@it-konsult.com) [001007 03:28]:
> 
> Hi all,
> 
> I'm not really that lazy, I could probably find out
> pretty quickly from the excellent guide or the eagle 
> book in my lap right now.
> 
> It's just that I'm way behind schedule for an application
> thats due on monday :=) Any time saved will be greatly
> appreciated, I promised my daughter a biketrip today.
> 
> Given this:
> 
> 
> <Location /padm>
>   SetHandler perl-script
>   PerlHandler Apache::padm
> </Location>
> 
> 
> What is the fastest/simplest way to add basic authorization?
> I'm comfortable with hardcoded usernames/passwords in a
> handler for now.
> 
> Many, many thanks in advance.

There's nothing that says you have to use perl-based authorization
just because you're using mod_perl. Doing it the simple apache way --
with htpasswd files -- would also be fine (and ez to setup):

<Location /padm>
 AuthName "My Auth"
 AuthType Basic
 AuthUserFile "/home/httpd/myapp/auth"
 require valid-user
</Location>

The file /home/httpd/myapp/auth is administered with the 'htpasswd'
binary distributed with Apache. The Apache website has more info,
examples, etc.

Chris

-- 
Chris Winters
Senior Internet Developer    intes.net
cwinters@intes.net           http://www.intes.net/
Integrated hardware/software solutions to make the Internet work for you.