Install CakeOTP
Fresh installation starting from CakeOTP:
- Download CakeOTP
- Unzip CakeOTP into your web servers apps folder (htdocs or www …)
- Create a database for CakeOTP and configure the connection in:
[base folder]\cakeotp\gk\trunk\app\config\database.php - Run the following script to create a user table:
CREATE TABLE IF NOT EXISTS `users` ( `id` int(11) NOT NULL auto_increment, `username` char(50) default NULL, `password` char(40) default NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=23 ;
- Your done! Run the web server and the database and go to http://localhost/cakeotp/ (this can different on different machines)
Using existing CakePHP
- Download CakeOTP
- Copy the OTP component from app/controllers/components/otp.php to your app
- Review the user controller and user views, copy and modify as you see fit
Make sure you have enabled the Cakephp core Auth component and created the Users Table.
You can also read CakePHP documentation and run CakeOTP online demo.
Feel free to post comments and questions.