I see that in the CakePHP 3 documentation examples the Auth component allow and deny functions are used in initialize function of the controllers. Whereas I see some examples online and on stackoverflow where people use those methods calls in beforeFilter.
What's the best and most efficient way to deal with this in CakePHP 3.6 application? Should I use the following method calls:
$this->Auth->allow(/*...*/);
$this->Auth->deny(/*...*/);
In initialize or beforeFilter?
Thanks for any help.