Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: mod_perl handler for file downloads: good call or bad

by Errto (Vicar)
on Jun 20, 2007 at 18:18 UTC ( [id://622344]=note: print w/replies, xml ) Need Help??


in reply to Re: mod_perl handler for file downloads: good call or bad
in thread mod_perl handler for file downloads: good call or bad

Sorry for not mentioning this in the OP, but I don't think I can use an Authz handler, because that seems to require using HTTP authentication, whereas I have my own mechanism for dealing with the "who" aspect.
  • Comment on Re^2: mod_perl handler for file downloads: good call or bad

Replies are listed 'Best First'.
Re^3: mod_perl handler for file downloads: good call or bad
by clinton (Priest) on Jun 20, 2007 at 18:24 UTC
    You can do anything you like in the PerlAuthzHandler, including returning a login page - HTTP authentication is just how apache implements it by default

    Clint

      I've been looking over the link sent by Fletch and it really doesn't look like that's the case. The Authz seems to depend on a successful pass of the Authen pahse, which in turn requires the directory to be protected with either Basic or Digest authentication as configured in httpd.conf My application uses neither Basic nor Digest authentication but rather a third-party authentication module that communicates the user ID in a custom manner. The issue is not showing a login page but rather that I have to reject the request if the user ID (as determined through my custom method) should not have access to the resource.
        Hmm- it looks like you have a point there. In which case it may be easier to use a standard PerlRequestHandler, and if they are allowed access, use $r->sendfile($filename) to send the file.

        Clint

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://622344]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2024-04-25 21:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found