1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 09:49:28 +02:00
This commit is contained in:
Daniel Neto 2024-12-03 10:40:47 -03:00
parent 3781bb7a05
commit 80dbf3d58f
5 changed files with 283 additions and 50 deletions

View file

@ -59,6 +59,7 @@ class API extends PluginAbstract
global $global;
$obj = new stdClass();
$obj->APISecret = md5($global['salt'] . $global['systemRootPath'] . 'API');
$obj->standAloneFFMPEG = '';
return $obj;
}
@ -2904,6 +2905,22 @@ class API extends PluginAbstract
}
return false;
}
/**
* @param array $parameters return true if the secret is valid and false if it is not
* 'APISecret' mandatory for security reasons - required
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&APISecret={APISecret}
* @return \ApiObject Returns an ApiObject.
*/
public function get_api_isAPISecretValid($parameters)
{
global $global;
if (!self::isAPISecretValid()) {
return new ApiObject("APISecret is invalid");
}else{
return new ApiObject("APISecret is valid", false);
}
}
}
class ApiObject