Hey,
Controller/AppController.php
<?php
App::uses('Controller', 'Controller');
class AppController extends Controller {
public $components = array(
'Auth' => array(
'authenticate' => array(
'Form' => array(
'fields' => array('username' => 'user_login', 'password' => 'user_pass'),
'passwordHasher' => 'Custom'
)
)
)
);
}
Controller/Component/Auth/CustomPasswordHasher.php
<?php
App::uses('AbstractPasswordHasher', 'Controller/Component/Auth');
class CustomPasswordHasher extends AbstractPasswordHasher {
public function hash($password) {
return 'hello';
}
public function check($password, $hash) {
return true;
}
}
What is the problem?
I tried this with my custom pw hasher: Simple Authentication and Authorization Application - 2.x
Form data:
_method: POST
data[User][user_login]: abc
data[User][user_pass]: xyz
Thanks.