1
2
3
4
5
6
7
8
9
10
# checking expiration tickers of individuals parameters, if any:
my @expired_params = ();
if ( $self->{_DATA}->{_SESSION_EXPIRE_LIST} ) {
while (my ($param, $max_exp_interval) = each %{ $self->{_DATA}->{_SESSION_EXPIRE_LIST} } ) {
if ( ($self->{_DATA}->{_SESSION_ATIME} + $max_exp_interval) <= time() ) {
push @expired_params, $param;
}
}
}
$self->clear(\@expired_params) if @expired_params;
1
2
3
4
5
6
if ( not defined $session->param( $tokenname ) { # Parameter der Session abgelaufen?
my $tok = CreateNewToken(); # Neues Token erstellen
$session->param( $tokenname, $tok ); # Token in Session speichern
$session->expire( "10m" ); # Token nach 10 Minuten ablaufen lassen
$session->flush(); # Session speichern
}
Quotereturns a session parameter set to $name or undef if it doesn't exist
— https://metacpan.org/release/MARKSTOS/CGI-Session-...