Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allowUnauthenticated() for all actions #645

Open
dereuromark opened this issue Nov 7, 2023 · 3 comments
Open

allowUnauthenticated() for all actions #645

dereuromark opened this issue Nov 7, 2023 · 3 comments

Comments

@dereuromark
Copy link
Member

dereuromark commented Nov 7, 2023

Refs #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 dereuromark added this to the 3.x milestone Nov 7, 2023
@LordSimal
Copy link
Contributor

LordSimal commented Nov 7, 2023

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

@dereuromark
Copy link
Member Author

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.

Copy link

github-actions bot commented Mar 7, 2024

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 github-actions bot added the stale label Mar 7, 2024
@dereuromark dereuromark added pinned and removed stale labels Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants