for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Craft;
/**
* ApiAuth Plugin.
*
* Authentication plugin for an api
* @author Nerds and company
* @copyright Copyright (c) 2015, Nerds and company
* @link http://www.itmundi.nl
*/
class ApiAuthPlugin extends BasePlugin
{
* Return plugin name.
* @return string
public function getName()
return Craft::t('Api Authentication');
}
* Return plugin version.
public function getVersion()
return '0.2';
* Return developer name.
public function getDeveloper()
return 'Nerds and company';
* Return developer url.
public function getDeveloperUrl()
return 'http://www.nerds.company';
* Register site routes.
* @return array
public function registerSiteRoutes()
return array(
'api/authenticate' => array('action' => 'apiAuth/authenticate'),
'api/resetPassword' => array('action' => 'apiAuth/resetPassword')
);
* Load the abstract controller
public function init()
require_once(__DIR__.'/controllers/AbstractAuthorizedApiController.php');