Source of file RESTfulAPI_TokenAuthExtension.php
Size: 0,789 Bytes - Last Modified: 2021-12-24T06:44:03+00:00
/var/www/docs.ssmods.com/process/src/code/authenticator/RESTfulAPI_TokenAuthExtension.php
12345678910111213141516171819202122232425262728293031 | <?php use SilverStripe\ORM\DataExtension; use SilverStripe\Forms\FieldList; /** * RESTfulAPI Token authentication data extension * Add to any DataObject that will store the authentication token * e.g. Member * * @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 */ class RESTfulAPI_TokenAuthExtension extends DataExtension { private static $db = array( 'ApiToken' => 'Varchar(160)', 'ApiTokenExpire' => 'Int' ); public function updateCMSFields(FieldList $fields) { $fields->removeByName('ApiToken'); $fields->removeByName('ApiTokenExpire'); } } |