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

Disabling authentication for certain actions. #94

Closed
robertpustulka opened this issue Mar 21, 2017 · 1 comment
Closed

Disabling authentication for certain actions. #94

robertpustulka opened this issue Mar 21, 2017 · 1 comment

Comments

@robertpustulka
Copy link
Member

robertpustulka commented Mar 21, 2017

I'm wondering how can I make some controllers/actions public?

Currently after adding AuthenticationMiddleware all requests have to be authenticated. The only exception is for login url in FormAuthenticator. But there are some use cases like home page etc, where authentication is not necessary.

I know this plugin intends to decouple authorization from authentication but my use case takes place before authorization is even possible. I want to have actions not authenticated at all.

In AuthComponent we had allow() and deny() to control when authentication should take place. Now this feature is missing.

@robertpustulka
Copy link
Member Author

robertpustulka commented Mar 21, 2017

Me too stupid for this :)

For the future reference:
I thought that response fails if the authentication fails. But it doesn't. There's failed authentication result in $request->getAttribute('authenticationResult') and nothing more.

Sorry for this unecessary issue.

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

1 participant