X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fapibareauth.php;h=043181b07a4933c7d88891012ddb7b9f7364ff41;hb=119d0f7dbab40f30170ba263de78d7e9cea984db;hp=8921cddca084d07853ff5d6868aec0440f03179d;hpb=de5ff19713a990af197330dd8e4314de465ffe76;p=quix0rs-gnu-social.git diff --git a/lib/apibareauth.php b/lib/apibareauth.php index 8921cddca0..043181b07a 100644 --- a/lib/apibareauth.php +++ b/lib/apibareauth.php @@ -23,8 +23,16 @@ * * @category API * @package StatusNet + * @author Adrian Lang + * @author Brenda Wallace + * @author Craig Andrews + * @author Dan Moore + * @author Evan Prodromou + * @author mEDI + * @author Sarven Capadisli * @author Zach Copley * @copyright 2009 StatusNet, Inc. + * @copyright 2009 Free Software Foundation, Inc http://www.fsf.org * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ @@ -35,25 +43,53 @@ if (!defined('STATUSNET')) { require_once INSTALLDIR.'/lib/apiauth.php'; +/** + * Actions extending this class will require auth unless a target + * user ID has been specified + * + * @category API + * @package StatusNet + * @author Adrian Lang + * @author Brenda Wallace + * @author Craig Andrews + * @author Dan Moore + * @author Evan Prodromou + * @author mEDI + * @author Sarven Capadisli + * @author Zach Copley + * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 + * @link http://status.net/ + */ class ApiBareAuthAction extends ApiAuthAction { + /** + * Take arguments for running + * + * @param array $args $_REQUEST args + * + * @return boolean success flag + * + */ + function prepare($args) + { + parent::prepare($args); + return true; + } + /** * Does this API resource require authentication? * * @return boolean true or false */ - function requiresAuth() { // If the site is "private", all API methods except statusnet/config // need authentication - if (common_config('site', 'private')) { return true; } // check whether a user has been specified somehow - $id = $this->arg('id'); $user_id = $this->arg('user_id'); $screen_name = $this->arg('screen_name'); @@ -64,5 +100,4 @@ class ApiBareAuthAction extends ApiAuthAction return false; } - -} \ No newline at end of file +}