(RADIATOR) Session-Timeout PostAuthHook

Herman verschooten H.verschooten at webvisie.net
Fri Dec 19 10:04:58 CST 2003

I was looking for a way to dynamically set the session-timeout to the
end of the month.  Since this does not seem to be standard, I made an
attempt to write a PostAuthHook:
use Time::Local;
# If Session-Timeout=EM then set it to the number of seconds left in
this month.
 my $p = ${$_[1]};
 my $SessionTimeout = $p->get_attr('Session-Timeout');
 if (defined $SessionTimeout)
  if( $SessionTimeout eq 'EM')
   my $sec;
   my $min;
   my $hour;
   my $mday;
   my $mon;
   my $year;
   my $wday;
   my $yday;
   my $isdst;
   ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
   if($mon eq 12)
    $mon = 0;
   my $Timeout = timelocal(0,0,0,1,$mon,$year) -1 - time;

If anybody knows a better way to do this, please let me know.
Herman verschooten
WebVisie bvba
Een klare kijk op interne en externe communicatie
Oudaan 15 / 33        2000 Antwerpen       http://www.webvisie.net
tel 03/206.72.70       fax 03/234.93.82      h.verschooten at webvisie.net
<mailto:h.verschooten at webvisie.net>    
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.open.com.au/pipermail/radiator/attachments/20031219/4ab6fe7e/attachment.html>

More information about the radiator mailing list