fix(apps::backup::rubrik::restapi): api token not cleaned and renewed (#5344)

Co-authored-by: Sylvain Cresto <scresto@centreon.com>

Refs:CTOR-729
This commit is contained in:
Evan-Adam 2025-06-06 13:29:30 +02:00 committed by GitHub
parent e1b820b744
commit 95a4456d98
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 3 deletions

View File

@ -317,6 +317,11 @@ sub request_api_paginate {
$self->{output}->option_exit();
}
if ($self->{http}->get_code() == 401) {
$self->{output}->add_option_msg(short_msg => "Request needs authentication!");
return
}
my $decoded;
eval {
$decoded = JSON::XS->new->allow_nonref(1)->utf8->decode($content);
@ -375,6 +380,11 @@ sub request_api {
);
}
if ($self->{http}->get_code() == 401) {
$self->{output}->add_option_msg(short_msg => "Authentication failed");
$self->{output}->option_exit();
}
return $result;
}

View File

@ -234,6 +234,8 @@ RRDCached
rsrp
rsrq
rssi
Rubrik
µs
Sansymphony
SAS
scenarii
@ -245,7 +247,6 @@ sinr
SkyHigh
SMS
SnapMirrors
SnapMirrors
snmp
snmpd.conf
space-usage-prct
@ -256,8 +257,8 @@ standAlone
statefile
--statefile-concat-cwd
Stormshield
SureBackup
superseed
SureBackup
systemd
SysVol
TCP
@ -282,7 +283,6 @@ UninterrupibleSleep
uniq
uptime
--urlpath
µs
usage-prct
usec
userpass