diff --git a/htdocs/api/class/api_access.class.php b/htdocs/api/class/api_access.class.php index 189dd46fb7f..585be857979 100644 --- a/htdocs/api/class/api_access.class.php +++ b/htdocs/api/class/api_access.class.php @@ -45,12 +45,20 @@ class DolibarrApiAccess implements iAuthenticate public static $user = ''; + /** + * @return string string to be used with WWW-Authenticate header + * @example Basic + * @example Digest + * @example OAuth + */ + public function __getWWWAuthenticateString(); + /** * Check access * * @return boolean */ - public function __isAllowed() + public function _isAllowed() { global $db; @@ -105,11 +113,6 @@ class DolibarrApiAccess implements iAuthenticate return in_array(static::$role, (array) static::$requires) || static::$role == 'admin'; } - public function __getWWWAuthenticateString() - { - return ''; - } - /** * Verify access *