I am trying to make my own custom password hasher. I have read CakePHP 2.4 documentation and I have followed instructions
This is my CustomPasswordHasher Class on Controller/Component/Auth
App::uses('CustomPasswordHasher', 'Controller/Component/Auth');
class CustomPasswordHasher extends AbstractPasswordHasher {
public function hash($password) {
return $password;
}
public function check($password, $hashedPassword) {
return $password === $this->hash($hashedPassword);
}
}
These are my components on UsersController
public $components = array(
'Session',
'Auth' => array(
'loginRedirect' => array('controller' => 'posts', 'action' => 'index'),
'logoutRedirect' => array('controller' => 'pages', 'action' => 'display', 'home'),
'authenticate' => array(
'Form' => array(
'passwordHasher' => array(
'className' => 'Custom'
)
)
)
)
);
When im trying to log in a user i got this error:
Error: Class 'AbstractPasswordHasher' not found
File: C:\Users\Jonathan\Dropbox\Public\WebSites\umbrellaApp\app\Controller\Component\Auth\CustomPasswordHasher.php
Line: 5Notice: If you want to customize this error message, create app\View\Errors\fatal_error.ctp
i've looked up at my core and i can see AbstracrPasswordHasher
can anyone help me?
Thanks