14 $mandatory = array(
"policy",
"minsize",
"maxsize",
"classcount",
"allowlogin");
16 foreach ($mandatory as
$key) {
17 if (!isset($options[
$key])) {
22 return new Alternc_Api_Response(array(
"code" => self::ERR_INVALID_ARGUMENT,
"message" =>
"Missing or invalid argument: " . $missing));
24 $result = $this->admin->editPolicy($options[
"policy"], $options[
"minsize"], $options[
"maxsize"], $options[
"classcount"], $options[
"allowlogin"]);
38 $result = $this->admin->listPasswordPolicies();
53 $mandatory = array(
"policy",
"login",
"password");
55 foreach ($mandatory as
$key) {
56 if (!isset($options[
$key])) {
61 return new Alternc_Api_Response(array(
"code" => self::ERR_INVALID_ARGUMENT,
"message" =>
"Missing or invalid argument: " . $missing));
63 $result = $this->admin->checkPolicy($options[
"policy"], $options[
"login"], $options[
"password"]);
Any Legacy AlternC Api should use this class as a parent to be able to handle properly the access rig...
alterncLegacyErrorManager()
return a proper Alternc_Api_Response from an error class and error string from AlternC legacy class
Passowrd Policy Api of AlternC, used by alternc-api package.
update($options)
API Method from legacy class method admin->editPolicy($policy,$minsize,$maxsize,$classcount,...
find($options)
API Method from legacy class method admin->listPasswordPolicies()
check($options)
API Method from legacy class method admin->checkPolicy($policy,$login,$password)
Standard Response object for the AlternC API.
if(empty($_POST['key'])||empty($_POST['val'])) $key