Authake is finally arrived to CakePHP 2.2.3 and is (another) solution to manage users and groups and their rights in a CakePHP platform, as well as their registration, email confirmation and password changing requests. It’s composed by a component, a plugin, and a helper., (*1)
For install instructions and feedback, please go to Authake home page: http://www.mtkocak.net/?p=333, (*5)
-
Unzip the plugin to your app/Plugin folder with the name Authake. Case is important, lowercase folder name does not work., (*6)
-
You have to have in your bootstrap.php, (*7)
CakePlugin::loadAll();
//or
CakePlugin::load('Authake');
-
You can create schema from plugin using command to console terminal when you are in your app folder:, (*8)
Do not use any schema to generate SQL. Causes redirection loop instead of it add the Authake/db/authake_clean.sql to your database., (*9)
-
Add this to your config/database.php to make authake work., (*10)
The idea behind this is that it would be possible to have 1 Authake instalation which handle multiple apps., (*11)
var $authake = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => ", //username for the db
'password' => ", //password for the db
'database' => 'authake', //or any other where you have imported the authake.sql file
'prefix' => ",
);
-
Create AppController.php in you'r app's Controller folder first., (*12)
Change it's contents like this: UPDATED: No need debug_kit anymore, (*13)
auth();
}
private function auth(){
Configure::write('Authake.useDefaultLayout', true);
$this->Authake->beforeFilter($this);
}
}
?>
-
Use username: admin password: admin to login, (*14)
For any question mtkocak@gmail.com, (*15)
-
Change the permissions of Config folder to 777 and recurse into enclosed items
Chmod 777, (*16)
-
Your login page is located at http://localhost/auth/authake/user/login if you want to login from http://localhost/auth/login you have to create a route at app/config/routes.php like this:, (*17)
Router::connect('/login', array('plugin'=>'authake','controller' => 'user', 'action' => 'login'));
Before the line that contains:, (*18)
require CAKE . 'Config' . DS . 'routes.php';