Commit 772d9353 authored by Côme Chilliet's avatar Côme Chilliet

Merge branch '5745-add-rest-api-client-in-argonaut-common' into '1.4-dev'

Resolve "Add REST API client in argonaut-common"

See merge request argonaut/argonaut!134
parents 2379ded7 2ff99c00
......@@ -29,7 +29,7 @@ use warnings;
use 5.008;
use Argonaut::Libraries::FusionDirectoryWebService qw(argonaut_get_rest_client);
use Argonaut::Libraries::FusionDirectoryWebService qw(argonaut_get_rest_client argonaut_parse_rest_error);
use JSON;
......@@ -105,12 +105,12 @@ sub argonaut_supann_update_states {
if ($updateNeeded) {
$client->PUT('/objects/user/'.$dn.'/supannAccountStatus/supannRessourceEtatDate', encode_json($supannRessourceEtatDateNewValues));
if ($client->responseCode() ne '200') {
die('Request to REST API failed: '.$client->responseCode().' - '.argonaut_parse_rest_error($client));
die('Request to REST API failed: '.$client->responseCode().' - '.argonaut_parse_rest_error($client)."\n");
}
}
}
} else {
die('Request to REST API failed: '.$client->responseCode().' - '.argonaut_parse_rest_error($client));
die('Request to REST API failed: '.$client->responseCode().' - '.argonaut_parse_rest_error($client)."\n");
}
}
......
......@@ -561,7 +561,7 @@ argonaut-user-reminder - read account expiration date from ldap and send emails
=head1 SYNOPSIS
argonaut-user-reminder [--verbose] [--posix|--ppolicy|--both (default)]
argonaut-user-reminder [--help] [--verbose] [--posix] [--ppolicy] [--supann] [--all (default)] [--supann-update]
=head1 DESCRIPTION
......@@ -573,21 +573,35 @@ expiration date or change the password.
=over 3
=item B<--help>
Help message
=item B<--verbose>
be verbose
Be verbose
=item B<--posix>
check only POSIX account expiration (based on shadowExpire)
Check POSIX account expiration (based on shadowExpire)
=item B<--ppolicy>
check only ppolicy password expiration (based on pwdChangedTime and pwdMaxAge)
Check ppolicy password expiration (based on pwdChangedTime and pwdMaxAge)
=item B<--supann>
Check supann expiration (based on supannRessourceEtatDate)
=item B<--all>
Check POSIX account, ppolicy password and supann expiration
=item B<--both>
=item B<--supann-update>
check both POSIX account expiration and ppolicy password expiration
Check supannRessourceEtatDate end date and update values if needed.
To use this you need to fill [rest] section of argonaut.conf and install webservice plugin
on your FusionDirectory installation.
=back
......
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