Source of file TokenAuthExtension.php
Size: 0,825 Bytes - Last Modified: 2021-12-24T06:41:16+00:00
/var/www/docs.ssmods.com/process/src/src/Extensions/TokenAuthExtension.php
1234567891011121314151617181920212223242526272829303132333435 | <?php namespace Colymba\RESTfulAPI\Extensions; use SilverStripe\Forms\FieldList; use SilverStripe\ORM\DataExtension; /** * 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 TokenAuthExtension extends DataExtension { private static $db = array( 'ApiToken' => 'Varchar(160)', 'ApiTokenExpire' => 'Int', ); public function updateCMSFields(FieldList $fields) { $fields->removeByName('ApiToken'); $fields->removeByName('ApiTokenExpire'); } } |