x gives me an error "Authentication adapter "xmlRpc" was not found" when I try implement a custom login component.
In my AppController.php I have the following
<?php
App::uses('Controller', 'Controller');
//Custom Auth
App::uses('xmlRpc', 'Controller/Component/Auth');
class AppController extends Controller {
//Authentication component
public $components = array(
'Session',
'DebugKit.Toolbar',
'Auth' => array(
'authenticate' => array(
'xmlRpc'
)
)
);
}
Then I have my login compononent located in /Controller/Component/Auth/xmlRpc.php
<?php
App::uses('BaseAuthenticate', 'Controller/Component/Auth');
class xmlRpc extends BaseAuthenticate {
public function authenticate(CakeRequest $request, CakeResponse $response) {
return true;
}
}
?>
In my users controller I have the following:
<?php
App::uses('AppController', 'Controller');
//Custom Auth
App::uses('xmlRpc', 'Controller/Component/Auth');
class UsersController extends AppController {
public function logout() {
return $this->redirect($this->Auth->logout());
}
public function login() {
if ($this->request->is('post')) {
if ($this->Auth->login()) {
return $this->redirect($this->Auth->redirectUrl());
// Prior to 2.3 use `return $this->redirect($this->Auth->redirect());`
} else {
$this->Session->setFlash(__('Username or password is incorrect'), 'default', array(), 'auth');
}
}
}
}
?>
By the way in my authenticate function I always return true just for testing. Will add logic once I get rid of this error. Please assist and take it easy on me because im a Cake n00b. How to I get cake to see my custom authentication adapter?