CakePHP: Authake plugin with installation guide

Finally the Authake Plugin have an Installation guide.

Basically the plugin provide Authentication and Authorization functionality for CakePHP’s appliation with few line of code. Authake has advanced User-Group-Role interface and allow you to secure your CakePHP’s application within a minute.

The current version of the Plugin is “wrapped” in a single folder (according to CakePHP 1.3 conventions) under the Plugins.

Update: This plugin has been addapted for CakePHP 2.0 by Mutlu Tevfik Kocak. Please use his repository for actual version of the plugin.

20 thoughts on “CakePHP: Authake plugin with installation guide

  1. xriokax


    Quite new to cake development….so would you suggest this as “the” ACL to use with cakePHP or are their better alternatives out there?



  2. Nik Chankov Post author


    CakePHP has a good ACL build in functionality, but actually it’s a tool which would help you to build a good Authentication and Authorization functionality.

    Authake doesn’t use the build-in Cake’s functions. But it’s really plug and play so login, registration (basic of course), lost password and all other necessary things are there ready to be used.

    I can’t say if it’s the best solution, but I liked it and so far it’s working for me.

  3. xriokax

    cool, thanks for your clarification.

    are you sticking with cakephp as it progresses or do you think you will go the lithium route?

    id be very interested to hear your comments on that…


  4. Nik Chankov Post author

    Well, I am using CakePHP since 2007, so I am quite happy with it. The community is big and most important the project is moving. So I would stick with the framework so far.

    About the litium – I haven’t used it in a project, just tested it, so cannot say is it ok or not. But I think that the community is small, so the support will be a little bit problematic.

  5. Jim

    Many thanks to you, Nik, for updating this.

    Authake has one feature that I do not see in any other Cake auth system/plugin: that is the ability of users to belong to multiple groups. That is why I was attracted to Authake and why I am so pleased that Nik has updated.

  6. Jorge

    Hey nice work, I want add groups and the users can selected that group from the register form?? how you drive it

  7. Nik Chankov Post author

    Hi Jorge,

    feature like this is not available. What you can do is to add default group to newly registered users.

    I don’t see the point why you would give such option to the users. I think by default they will choose the group with maximum permission i.e. Admin. 🙂

  8. Jorge

    Hi! thx for reply! 🙂 well look suppose you have two different users e.g: buyer or provider. the users must be select from the register form
    wich group they belong. the admin only can control what group is available for public register proccess, this is the point 🙂

  9. Rangel

    Hello, Nik Chankov! Nice plugin. I’m new in cakephp and want to ask you – how to use this plugin in other models(i.e i want to secure model post/add.ctp.) Thank you in advance!

  10. Simon

    Excellent plugin
    Question, How do you test if a user is logged in from a controller within the main program, do you have to call the component within the plugin?
    Thanks in adavnce

  11. Nik Chankov Post author

    Well yes, you can test if the user is logged in with this function:


    After all, if you want to protect your application you need to include this plugin in all of the pages, and the best way is to include it in app controller.

  12. Simon

    Nik – Many thanks 🙂

    Would this work if you want to call it from within another plugin, and can I call other methods in the Authake plugin from another Plugin. Many Thanks

  13. Simon

    slight correction to my previous, that is call these methods in your plugin from a component in another plugin

  14. Nik Chankov Post author

    Basically, if you are writing this “another plugin”, then prepare a method which can accept the Authake instance in the component.

    The same way I am using it in CakeMenu plugin – the function which initialize the menu accept a parameter Authake object and then you can use it in the class. If you want to use it in your plugin’s controller, then you can include it as you can include it in the all other controllers.

  15. Jim


    Your revised Authake and new CakeMenu are working great. Thanks again for these.

    Now I have turned my attention to adding a REST interface for our Drupal intranet to have read-only access to some basic table information like staff directory and phone numbers. I am thinking about using this REST plugin:

    Since my CakePHP app and Drupal are on the same machine I plan expose the Cake REST to Drupal via a separate localhost-only Apache VHost.

    What I am trying to decide is whether to integrate REST plug-in and functions with my Authake/CakeMenu application or maybe just build a separate small Cake application just for the relatively small number of models and controllers that will be exposed.

    If I point the REST plug-in at existing controller stucture I am afraid that it could run afoul of the present app_controller.php and the included Authake BeforeFilter.

    While a bit duplicative and inefficient, I am thinking that a separate app might be easier to debug and cause less disruption in the use of the main application.

    Anyhow, as usual, just thinking out loud 🙂

    Hope your weather better than ours. No Spring until the Summer, looks like 🙁


  16. Nik Chankov Post author

    Hi Jose,

    unfortunately I haven’t try that. I had experience with Facebook Connect plugin from Nick Baker in 2 projects. The first one was planned only for Facebook Authentication (of external users) and nothing more than FB id was needed. The second one is using the Cake’s Auth component + User’s plugin from CakeDC, but the decision for this wasn’t mine. 🙂

    Basically you need to extend Facebook Connect component and at least to overwrite the __syncFacebookUser() and probably __initUserModel() and to implement the logic from Authake in order to fill the proper table and to login the FB user automatically. I would love to help on this, but unfortunately, I am really busy at the moment and I cannot help much. 🙁

  17. Mutlu Tevfik Kocak

    Hello Nik,

    I really like the plugin you made.

    I am trying run authake plugin using cakephp 2.0, I changed all folder and file names like authake_app_controller.php -> AuthakeAppController.php, some other uses things. But I cannot run the plugin. It continuously say to me that

    Fatal error: Class ‘AuthakeAppController’ not found in /Applications/XAMPP/xamppfiles/htdocs/radicat2/app/Plugin/Authake/Controller/UsersController.php on line 22

    I also changes this->params to this->request->params and many other things.

    Do you have an idea?

Comments are closed.