PHP Class CakeDC\Users\Auth\ApiKeyAuthenticate

Inheritance: extends Cake\Auth\BaseAuthenticate
Show file Open project: CakeDC/users Class Usage Examples

Public Properties

Property Type Description
$types

Protected Properties

Property Type Description
$_defaultConfig

Public Methods

Method Description
authenticate ( Cake\Network\Request $request, Response $response ) : mixed Authenticate callback Reads the API Key based on configuration and login the user
getUser ( Cake\Network\Request $request ) : mixed Stateless Authentication System http://book.cakephp.org/3.0/en/controllers/components/authentication.html#creating-stateless-authentication-systems
header ( Cake\Network\Request $request ) : string Get the api key from the header
querystring ( Cake\Network\Request $request ) : string Get the api key from the querystring

Method Details

authenticate() public method

Authenticate callback Reads the API Key based on configuration and login the user
public authenticate ( Cake\Network\Request $request, Response $response ) : mixed
$request Cake\Network\Request Cake request object.
$response Cake\Network\Response Cake response object.
return mixed

getUser() public method

Config: $this->Auth->config('storage', 'Memory'); $this->Auth->config('unauthorizedRedirect', 'false'); $this->Auth->config('checkAuthIn', 'Controller.initialize'); $this->Auth->config('loginAction', false);
public getUser ( Cake\Network\Request $request ) : mixed
$request Cake\Network\Request Cake request object.
return mixed

header() public method

Get the api key from the header
public header ( Cake\Network\Request $request ) : string
$request Cake\Network\Request request
return string api key

querystring() public method

Get the api key from the querystring
public querystring ( Cake\Network\Request $request ) : string
$request Cake\Network\Request request
return string api key

Property Details

$_defaultConfig protected property

protected $_defaultConfig

$types public property

public $types