-
-
Notifications
You must be signed in to change notification settings - Fork 610
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
Authenticated anonymously not work #60
Comments
Hi, Have you tried adding api:
pattern: ^/api
stateless: true
anonymous: true
lexik_jwt:
# ... rest of your config It worked for me in the sandbox. |
Well work! |
Hi, Sorry I didn't really understand. But I think the problem you have is more related to your app and its security design than this bundle. The bundle only returns a 401 if it finds a json web token in the request and cannot match it against a user. Everything else is handled by symfony and your own config / logic. |
Thank you for your response. |
You should read this : 401 is for authentication (which the job of this bundle) and 403 is for authorization (which is handled by symfony roles, security voters and access control) either through the access_control in your security configuration or directly from your controllers, in the @secure annotation or the calls to the isGranted() method. Maybe you should try to make your app security system work with a standard form login, and when everything works fine then switch to JWT. But first make sure your roles, permissions and access control are properly set. |
Ok! Now it's all clear! |
Hi man,
good work with this bundle. I cloned and try the sandbox: https://github.com/slashfan/LexikJWTAuthenticationBundleSandbox
but i don't understand why if i change access control setting:
and i go to http://localhost:8000/angular-demo/index.html
I continue to see the authentication request.
P.S. in PageController.php (getPagesAction function) i comment these lines:
Thanks
The text was updated successfully, but these errors were encountered: