Source of file RESTfulAPI_Authenticator.php
Size: 0,957 Bytes - Last Modified: 2021-12-24T06:44:03+00:00
/var/www/docs.ssmods.com/process/src/code/authenticator/RESTfulAPI_Authenticator.php
1234567891011121314151617181920212223242526272829303132 | <?php /** * Basic required structure for any RESTfulAPI Authenticator * * @author Thierry Francois @colymba thierry@colymba.com * @copyright Copyright (c) 2013, Thierry Francois * * @license http://opensource.org/licenses/BSD-3-Clause BSD Simplified * * @package RESTfulAPI * @subpackage Authentication */ interface RESTfulAPI_Authenticator { /** * Checks if a request to the API is authenticated * * @param HTTPRequest $request HTTP API request * @return true|RESTfulAPI_Error True if token is valid OR RESTfulAPI_Error with details */ public function authenticate(HTTPRequest $request); /** * Returns the DataObject related to the authenticated request * * @param HTTPRequest $request HTTP API request * @return null|DataObject null if failed or the DataObject related to the request */ public function getOwner(HTTPRequest $request); } |