Update oidc tokens during sessions refresh (#2713)
This commit is contained in:
parent
f8d1d0fc5f
commit
96ef83893d
|
@ -203,8 +203,30 @@ sub refresh {
|
|||
$req->user( $data{_user} || $data{ $self->conf->{whatToTrace} } );
|
||||
$req->id( $data{_session_id} );
|
||||
foreach ( keys %data ) {
|
||||
delete $data{$_}
|
||||
unless ( /^_/ or /^(?:startTime|authenticationLevel)$/ );
|
||||
|
||||
# Variables that start with _ are kept accross refresh
|
||||
if (/^_/) {
|
||||
|
||||
# But not OIDC tokens, which can be refreshed
|
||||
if (
|
||||
/^(_oidc_access_token|_oidc_refresh_token|_oidc_access_token_eol)$/
|
||||
)
|
||||
{
|
||||
delete $data{$_};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# Other variables should be refreshed
|
||||
else {
|
||||
# But not these two
|
||||
if (/^(?:startTime|authenticationLevel)$/) {
|
||||
next;
|
||||
}
|
||||
else {
|
||||
delete $data{$_};
|
||||
}
|
||||
}
|
||||
}
|
||||
$data{_updateTime} = strftime( "%Y%m%d%H%M%S", localtime() );
|
||||
$self->logger->debug(
|
||||
|
|
Loading…
Reference in New Issue