authentication icon indicating copy to clipboard operation
authentication copied to clipboard

allowUnauthenticated() for all actions

Open dereuromark opened this issue 2 years ago • 3 comments

Refs https://github.com/cakephp/authentication/issues/361

It would be nice to have a less hacky way of

$this->Authentication->allowUnauthenticated([$this->request->getParam('action')]);

I can understand that not using any argument does not feel "safe" by default. As such, maybe the proposed '*' string could be very clear on this. Or we provide an own speaking method for it?

$this->Authentication->allowUnauthenticatedAll()

All()/Any() etc

dereuromark avatar Nov 07 '23 16:11 dereuromark

This can be achieved by just setting the requireIdentity to false https://book.cakephp.org/authentication/2/en/authentication-component.html#configure-automatic-identity-checks

LordSimal avatar Nov 07 '23 19:11 LordSimal

An option for specific controllers? As this is only to be applied for very specific controllers that know all their actions are to be public.

dereuromark avatar Nov 07 '23 20:11 dereuromark

This issue is stale because it has been open for 120 days with no activity. Remove the stale label or comment or this will be closed in 15 days

github-actions[bot] avatar Mar 07 '24 02:03 github-actions[bot]