Commit 09d9608f authored by Christophe Maudoux's avatar Christophe Maudoux

Modify Handler internal cache timeout & code order & Append debug mgs (#1509)

parent e6c034a3
......@@ -2124,14 +2124,18 @@ sub setSessionInfo {
# Date and time
if ( $self->{updateSession} ) {
$self->lmLog( "updateTime from Portal", 'debug' );
$self->{sessionInfo}->{updateTime} =
strftime( "%Y%m%d%H%M%S", localtime() );
}
else {
$self->{sessionInfo}->{_utime} ||= time();
my $now = time();
$self->lmLog( "now -> $now from Portal", 'debug' );
$self->{sessionInfo}->{_utime} ||= $now;
$self->{sessionInfo}->{startTime} =
strftime( "%Y%m%d%H%M%S", localtime() );
$self->{sessionInfo}->{_lastSeen} = time() if $self->{timeoutActivity};
$self->{sessionInfo}->{_lastSeen} = $now if ( $self->{timeoutActivity} );
$self->lmLog( "Update _lastSeen with $now from Portal", 'debug' ) if ( $self->{timeoutActivity} );
}
# Get environment variables matching exportedVars
......@@ -2713,8 +2717,11 @@ sub issuerForAuthUser {
$self->addSessionValue( '_issuerDB', $issuerDBtype, $self->{id} );
# Update session activity unless for Null IssuerDB
$self->updateSession( { '_lastSeen' => time() } )
my $now = time();
$self->updateSession( { '_lastSeen' => $now } )
if ( $self->{timeoutActivity} && $issuerDBtype ne 'Null' );
$self->lmLog( "******* Update _lastSeen with $now from Portal", 'debug' );
#if ( $self->{timeoutActivity} && $issuerDBtype ne 'Null' );
# Call IssuerDB module method
return $self->SUPER::issuerForAuthUser();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment