DarkAuth for the win!

16 minute read Published:


I’ve been working with CakePHP for a few years now and am very happy with it.  I’ve been working with the 1.2 version for a few months (since it went stable) and playing with the Auth and ACL core components.

I’ve decided that ACL is too complicated for most setups, and Auth is fine, but not perfect.  So after some research, I switched to the DarkAuth component, which was much better suited to my needs.

The main reasons I prefer it are:

  • Role/Group based access out of the box, which is how I ususally provision security anyway
  • Easy to customize/tweak to suit my needs (more below)
  • Easy to setup permissions, easy to add to app_controller, without then having to explicitly allow public controllers/actions… instead I have to explicitly restrict controllers or actions.  Also it’s easy to check for prefixes and restrict based on that (more below)
  • Fast

So here are some of my customizations:

I like having some parameters set on the controller for easy access to “who is logged in”, so I put this in the bottom of the DarkAuth startup() function:

`I’ve been working with CakePHP for a few years now and am very happy with it.  I’ve been working with the 1.2 version for a few months (since it went stable) and playing with the Auth and ACL core components.

I’ve decided that ACL is too complicated for most setups, and Auth is fine, but not perfect.  So after some research, I switched to the DarkAuth component, which was much better suited to my needs.

The main reasons I prefer it are:

  • Role/Group based access out of the box, which is how I ususally provision security anyway
  • Easy to customize/tweak to suit my needs (more below)
  • Easy to setup permissions, easy to add to app_controller, without then having to explicitly allow public controllers/actions… instead I have to explicitly restrict controllers or actions.  Also it’s easy to check for prefixes and restrict based on that (more below)
  • Fast

So here are some of my customizations:

I like having some parameters set on the controller for easy access to “who is logged in”, so I put this in the bottom of the DarkAuth startup() function:

`

I like using the core security class for password hashing, which can easily be done like so:

``I’ve been working with CakePHP for a few years now and am very happy with it.  I’ve been working with the 1.2 version for a few months (since it went stable) and playing with the Auth and ACL core components.

I’ve decided that ACL is too complicated for most setups, and Auth is fine, but not perfect.  So after some research, I switched to the DarkAuth component, which was much better suited to my needs.

The main reasons I prefer it are:

  • Role/Group based access out of the box, which is how I ususally provision security anyway
  • Easy to customize/tweak to suit my needs (more below)
  • Easy to setup permissions, easy to add to app_controller, without then having to explicitly allow public controllers/actions… instead I have to explicitly restrict controllers or actions.  Also it’s easy to check for prefixes and restrict based on that (more below)
  • Fast

So here are some of my customizations:

I like having some parameters set on the controller for easy access to “who is logged in”, so I put this in the bottom of the DarkAuth startup() function:

`I’ve been working with CakePHP for a few years now and am very happy with it.  I’ve been working with the 1.2 version for a few months (since it went stable) and playing with the Auth and ACL core components.

I’ve decided that ACL is too complicated for most setups, and Auth is fine, but not perfect.  So after some research, I switched to the DarkAuth component, which was much better suited to my needs.

The main reasons I prefer it are:

  • Role/Group based access out of the box, which is how I ususally provision security anyway
  • Easy to customize/tweak to suit my needs (more below)
  • Easy to setup permissions, easy to add to app_controller, without then having to explicitly allow public controllers/actions… instead I have to explicitly restrict controllers or actions.  Also it’s easy to check for prefixes and restrict based on that (more below)
  • Fast

So here are some of my customizations:

I like having some parameters set on the controller for easy access to “who is logged in”, so I put this in the bottom of the DarkAuth startup() function:

`

I like using the core security class for password hashing, which can easily be done like so:

``

Here’s how to inject admin requirements based on the admin routing path (prefix):

```I’ve been working with CakePHP for a few years now and am very happy with it.  I’ve been working with the 1.2 version for a few months (since it went stable) and playing with the Auth and ACL core components.

I’ve decided that ACL is too complicated for most setups, and Auth is fine, but not perfect.  So after some research, I switched to the DarkAuth component, which was much better suited to my needs.

The main reasons I prefer it are:

  • Role/Group based access out of the box, which is how I ususally provision security anyway
  • Easy to customize/tweak to suit my needs (more below)
  • Easy to setup permissions, easy to add to app_controller, without then having to explicitly allow public controllers/actions… instead I have to explicitly restrict controllers or actions.  Also it’s easy to check for prefixes and restrict based on that (more below)
  • Fast

So here are some of my customizations:

I like having some parameters set on the controller for easy access to “who is logged in”, so I put this in the bottom of the DarkAuth startup() function:

`I’ve been working with CakePHP for a few years now and am very happy with it.  I’ve been working with the 1.2 version for a few months (since it went stable) and playing with the Auth and ACL core components.

I’ve decided that ACL is too complicated for most setups, and Auth is fine, but not perfect.  So after some research, I switched to the DarkAuth component, which was much better suited to my needs.

The main reasons I prefer it are:

  • Role/Group based access out of the box, which is how I ususally provision security anyway
  • Easy to customize/tweak to suit my needs (more below)
  • Easy to setup permissions, easy to add to app_controller, without then having to explicitly allow public controllers/actions… instead I have to explicitly restrict controllers or actions.  Also it’s easy to check for prefixes and restrict based on that (more below)
  • Fast

So here are some of my customizations:

I like having some parameters set on the controller for easy access to “who is logged in”, so I put this in the bottom of the DarkAuth startup() function:

`

I like using the core security class for password hashing, which can easily be done like so:

``I’ve been working with CakePHP for a few years now and am very happy with it.  I’ve been working with the 1.2 version for a few months (since it went stable) and playing with the Auth and ACL core components.

I’ve decided that ACL is too complicated for most setups, and Auth is fine, but not perfect.  So after some research, I switched to the DarkAuth component, which was much better suited to my needs.

The main reasons I prefer it are:

  • Role/Group based access out of the box, which is how I ususally provision security anyway
  • Easy to customize/tweak to suit my needs (more below)
  • Easy to setup permissions, easy to add to app_controller, without then having to explicitly allow public controllers/actions… instead I have to explicitly restrict controllers or actions.  Also it’s easy to check for prefixes and restrict based on that (more below)
  • Fast

So here are some of my customizations:

I like having some parameters set on the controller for easy access to “who is logged in”, so I put this in the bottom of the DarkAuth startup() function:

`I’ve been working with CakePHP for a few years now and am very happy with it.  I’ve been working with the 1.2 version for a few months (since it went stable) and playing with the Auth and ACL core components.

I’ve decided that ACL is too complicated for most setups, and Auth is fine, but not perfect.  So after some research, I switched to the DarkAuth component, which was much better suited to my needs.

The main reasons I prefer it are:

  • Role/Group based access out of the box, which is how I ususally provision security anyway
  • Easy to customize/tweak to suit my needs (more below)
  • Easy to setup permissions, easy to add to app_controller, without then having to explicitly allow public controllers/actions… instead I have to explicitly restrict controllers or actions.  Also it’s easy to check for prefixes and restrict based on that (more below)
  • Fast

So here are some of my customizations:

I like having some parameters set on the controller for easy access to “who is logged in”, so I put this in the bottom of the DarkAuth startup() function:

`

I like using the core security class for password hashing, which can easily be done like so:

``

Here’s how to inject admin requirements based on the admin routing path (prefix):


And some other useful controller tricks:

````I’ve been working with CakePHP for a few years now and am very happy with it.  I’ve been working with the 1.2 version for a few months (since it went stable) and playing with the [Auth][1] and [ACL][2] core components.

I’ve decided that ACL is too complicated for most setups, and Auth is fine, but not perfect.  So after some research, I switched to the [DarkAuth][3] component, which was much better suited to my needs.

The main reasons I prefer it are:

  * <span style="background-color: #ffffff; ">Role/Group based access out of the box, which is how I ususally provision security anyway</span>
  * <span style="background-color: #ffffff; ">Easy to customize/tweak to suit my needs (more below)</span>
  * <span style="background-color: #ffffff; ">Easy to setup permissions, easy to add to app_controller, without then having to explicitly allow public controllers/actions&#8230; instead I have to explicitly restrict controllers or actions.  Also it&#8217;s easy to check for prefixes and restrict based on that (more below)</span>
  * <span style="background-color: #ffffff; ">Fast</span>

So here are some of my customizations:

I like having some parameters set on the controller for easy access to &#8220;who is logged in&#8221;, so I put this in the bottom of the DarkAuth startup() function:

`I&#8217;ve been working with CakePHP for a few years now and am very happy with it.  I&#8217;ve been working with the 1.2 version for a few months (since it went stable) and playing with the [Auth][1] and [ACL][2] core components.

I&#8217;ve decided that ACL is too complicated for most setups, and Auth is fine, but not perfect.  So after some research, I switched to the [DarkAuth][3] component, which was much better suited to my needs.

The main reasons I prefer it are:

  * <span style="background-color: #ffffff; ">Role/Group based access out of the box, which is how I ususally provision security anyway</span>
  * <span style="background-color: #ffffff; ">Easy to customize/tweak to suit my needs (more below)</span>
  * <span style="background-color: #ffffff; ">Easy to setup permissions, easy to add to app_controller, without then having to explicitly allow public controllers/actions&#8230; instead I have to explicitly restrict controllers or actions.  Also it&#8217;s easy to check for prefixes and restrict based on that (more below)</span>
  * <span style="background-color: #ffffff; ">Fast</span>

So here are some of my customizations:

I like having some parameters set on the controller for easy access to &#8220;who is logged in&#8221;, so I put this in the bottom of the DarkAuth startup() function:

`

I like using the core security class for password hashing, which can easily be done like so:

``I&#8217;ve been working with CakePHP for a few years now and am very happy with it.  I&#8217;ve been working with the 1.2 version for a few months (since it went stable) and playing with the [Auth][1] and [ACL][2] core components.

I&#8217;ve decided that ACL is too complicated for most setups, and Auth is fine, but not perfect.  So after some research, I switched to the [DarkAuth][3] component, which was much better suited to my needs.

The main reasons I prefer it are:

  * <span style="background-color: #ffffff; ">Role/Group based access out of the box, which is how I ususally provision security anyway</span>
  * <span style="background-color: #ffffff; ">Easy to customize/tweak to suit my needs (more below)</span>
  * <span style="background-color: #ffffff; ">Easy to setup permissions, easy to add to app_controller, without then having to explicitly allow public controllers/actions&#8230; instead I have to explicitly restrict controllers or actions.  Also it&#8217;s easy to check for prefixes and restrict based on that (more below)</span>
  * <span style="background-color: #ffffff; ">Fast</span>

So here are some of my customizations:

I like having some parameters set on the controller for easy access to &#8220;who is logged in&#8221;, so I put this in the bottom of the DarkAuth startup() function:

`I&#8217;ve been working with CakePHP for a few years now and am very happy with it.  I&#8217;ve been working with the 1.2 version for a few months (since it went stable) and playing with the [Auth][1] and [ACL][2] core components.

I&#8217;ve decided that ACL is too complicated for most setups, and Auth is fine, but not perfect.  So after some research, I switched to the [DarkAuth][3] component, which was much better suited to my needs.

The main reasons I prefer it are:

  * <span style="background-color: #ffffff; ">Role/Group based access out of the box, which is how I ususally provision security anyway</span>
  * <span style="background-color: #ffffff; ">Easy to customize/tweak to suit my needs (more below)</span>
  * <span style="background-color: #ffffff; ">Easy to setup permissions, easy to add to app_controller, without then having to explicitly allow public controllers/actions&#8230; instead I have to explicitly restrict controllers or actions.  Also it&#8217;s easy to check for prefixes and restrict based on that (more below)</span>
  * <span style="background-color: #ffffff; ">Fast</span>

So here are some of my customizations:

I like having some parameters set on the controller for easy access to &#8220;who is logged in&#8221;, so I put this in the bottom of the DarkAuth startup() function:

`

I like using the core security class for password hashing, which can easily be done like so:

``

Here&#8217;s how to inject admin requirements based on the admin routing path (prefix):

```I&#8217;ve been working with CakePHP for a few years now and am very happy with it.  I&#8217;ve been working with the 1.2 version for a few months (since it went stable) and playing with the [Auth][1] and [ACL][2] core components.

I&#8217;ve decided that ACL is too complicated for most setups, and Auth is fine, but not perfect.  So after some research, I switched to the [DarkAuth][3] component, which was much better suited to my needs.

The main reasons I prefer it are:

  * <span style="background-color: #ffffff; ">Role/Group based access out of the box, which is how I ususally provision security anyway</span>
  * <span style="background-color: #ffffff; ">Easy to customize/tweak to suit my needs (more below)</span>
  * <span style="background-color: #ffffff; ">Easy to setup permissions, easy to add to app_controller, without then having to explicitly allow public controllers/actions&#8230; instead I have to explicitly restrict controllers or actions.  Also it&#8217;s easy to check for prefixes and restrict based on that (more below)</span>
  * <span style="background-color: #ffffff; ">Fast</span>

So here are some of my customizations:

I like having some parameters set on the controller for easy access to &#8220;who is logged in&#8221;, so I put this in the bottom of the DarkAuth startup() function:

`I&#8217;ve been working with CakePHP for a few years now and am very happy with it.  I&#8217;ve been working with the 1.2 version for a few months (since it went stable) and playing with the [Auth][1] and [ACL][2] core components.

I&#8217;ve decided that ACL is too complicated for most setups, and Auth is fine, but not perfect.  So after some research, I switched to the [DarkAuth][3] component, which was much better suited to my needs.

The main reasons I prefer it are:

  * <span style="background-color: #ffffff; ">Role/Group based access out of the box, which is how I ususally provision security anyway</span>
  * <span style="background-color: #ffffff; ">Easy to customize/tweak to suit my needs (more below)</span>
  * <span style="background-color: #ffffff; ">Easy to setup permissions, easy to add to app_controller, without then having to explicitly allow public controllers/actions&#8230; instead I have to explicitly restrict controllers or actions.  Also it&#8217;s easy to check for prefixes and restrict based on that (more below)</span>
  * <span style="background-color: #ffffff; ">Fast</span>

So here are some of my customizations:

I like having some parameters set on the controller for easy access to &#8220;who is logged in&#8221;, so I put this in the bottom of the DarkAuth startup() function:

`

I like using the core security class for password hashing, which can easily be done like so:

``I&#8217;ve been working with CakePHP for a few years now and am very happy with it.  I&#8217;ve been working with the 1.2 version for a few months (since it went stable) and playing with the [Auth][1] and [ACL][2] core components.

I&#8217;ve decided that ACL is too complicated for most setups, and Auth is fine, but not perfect.  So after some research, I switched to the [DarkAuth][3] component, which was much better suited to my needs.

The main reasons I prefer it are:

  * <span style="background-color: #ffffff; ">Role/Group based access out of the box, which is how I ususally provision security anyway</span>
  * <span style="background-color: #ffffff; ">Easy to customize/tweak to suit my needs (more below)</span>
  * <span style="background-color: #ffffff; ">Easy to setup permissions, easy to add to app_controller, without then having to explicitly allow public controllers/actions&#8230; instead I have to explicitly restrict controllers or actions.  Also it&#8217;s easy to check for prefixes and restrict based on that (more below)</span>
  * <span style="background-color: #ffffff; ">Fast</span>

So here are some of my customizations:

I like having some parameters set on the controller for easy access to &#8220;who is logged in&#8221;, so I put this in the bottom of the DarkAuth startup() function:

`I&#8217;ve been working with CakePHP for a few years now and am very happy with it.  I&#8217;ve been working with the 1.2 version for a few months (since it went stable) and playing with the [Auth][1] and [ACL][2] core components.

I&#8217;ve decided that ACL is too complicated for most setups, and Auth is fine, but not perfect.  So after some research, I switched to the [DarkAuth][3] component, which was much better suited to my needs.

The main reasons I prefer it are:

  * <span style="background-color: #ffffff; ">Role/Group based access out of the box, which is how I ususally provision security anyway</span>
  * <span style="background-color: #ffffff; ">Easy to customize/tweak to suit my needs (more below)</span>
  * <span style="background-color: #ffffff; ">Easy to setup permissions, easy to add to app_controller, without then having to explicitly allow public controllers/actions&#8230; instead I have to explicitly restrict controllers or actions.  Also it&#8217;s easy to check for prefixes and restrict based on that (more below)</span>
  * <span style="background-color: #ffffff; ">Fast</span>

So here are some of my customizations:

I like having some parameters set on the controller for easy access to &#8220;who is logged in&#8221;, so I put this in the bottom of the DarkAuth startup() function:

`

I like using the core security class for password hashing, which can easily be done like so:

``

Here&#8217;s how to inject admin requirements based on the admin routing path (prefix):

And some other useful controller tricks:

````

Published by in cakephp using 3269 words.

comments powered by Disqus