/var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/authentication/src/Identifier
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/authentication/src/Identifier/TokenIdentifier.php (1750B)
'token',
'dataField' => self::CREDENTIAL_TOKEN,
'resolver' => 'Authentication.Orm',
'hashAlgorithm' => null,
];
/**
* @inheritDoc
*/
public function identify(array $credentials)
{
$dataField = $this->getConfig('dataField');
if (!isset($credentials[$dataField])) {
return null;
}
if ($this->getConfig('hashAlgorithm') !== null) {
$credentials[$dataField] = Security::hash(
$credentials[$dataField],
$this->getConfig('hashAlgorithm')
);
}
$conditions = [
$this->getConfig('tokenField') => $credentials[$dataField],
];
return $this->getResolver()->find($conditions);
}
}