perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wouter van Vliet" <li...@woutervanvliet.nl>
Subject RE: Time and day based authorization
Date Sun, 11 Jul 2004 00:52:52 GMT
On zondag 11 juli 2004 1:39, David Arnold wrote:

> All,
> 
> I have a sequence of files (maybe 40) that I want to serve. Each file
> must be served no earlier than a certain time and no later than a
> certain time. Each of these time-day restrictions will be unique for
> each file. 
> 
> I am curious if the members of this group could suggest an
> authorization strategy in mod perl? I'm not looking for complete
> code, just general suggestions.
> 
> Thanks.

Interesting idea .. will all the files be made available under the same URL?
You're gonna have to take care of
*) Some place to store the files
*) Some method of holding the restrictions
*) A way to retrieve the restrictions
*) Some effort to serve the right file at the right time

Simplest would be one perl script, connecting to a database, looking up
which file is valid for this time, open that file with perl's file handling
methods and putting it back to the browser. Pretty straightforward.

Depending on how many times you'd be re-using the same file, it might be
easier/better/more fun to:
*) use the filename to hold the restrictions (ie:
secrets-200407121100-200407121800.txt for a file valid from 7 jul 2004 11:00
till 18:00 of the same day)
*) write a handler that serves the wanted file on a request

That's about all for my general suggestions at this midnighty hour.. Maybe
I'll have more tomorrow, hopefully after a reaction of your own :P

Grtngs,
Wouter



-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Mime
View raw message