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
Unable to find the controller for path /v1/login_check #31
Comments
Hi, Your configuration looks good. Have you tried a standard html login form to see if it works ? Maybe these will help : http://stackoverflow.com/questions/12409998/symfony2-1-unable-to-find-the-controller-for-path-login-check and http://stackoverflow.com/questions/20950149/unable-to-find-the-controller-for-path-login-check-symfony2 |
Hello @slashfan Thank you for your reply. I will not be using a standard login. This API will be backend only and won't have a UI. If I set the pattern to ^/v1/login$ I get "You are not authenticated", I tried adding on security: false, removing it from the access_control, setting the access_control to match the login pattern exactly, etc. I either get the original error or the error that I am not authenticated. |
Not sure if this will help, but you could try adding the firewalls:
login:
pattern: ^/v1/login$ access_control:
- { path: ^/v1/login$, roles: IS_AUTHENTICATED_ANONYMOUSLY } Also, if your not using normal login you could look at https://github.com/gfreeau/GfreeauGetJWTBundle for a stateless login replacement. |
@carlcraig when I try that I get "You are not authenticated." when requesting the login_check url. |
Im not sure then, maybe try removing your Could try leaving I might be completely wrong on this, but the times I have used https://github.com/gfreeau/GfreeauGetJWTBundle i havent needed to configure a route for login_check. |
Hi @carlcraig did you find the problem ? |
Not sure if @adetwiler has found what was causing the problem yet? I have not experienced this problem myself (although I am using the stateless login replacement). |
Sorry, that message was meant for @adetwiler ! |
Ping @adetwiler is it ok to close this issue ? |
Yes, finally got it working. Thanks for everyone's help! On Thursday, October 9, 2014, Nicolas Cabot notifications@github.com
|
Cool ! |
@adetwiler what was the solution? I have similar configuration with a similar error. |
@johnpancoast I can't remember specifically, but here is my new config that works. I separated the routes to where /api is accessible to anyone and use /sapi for authenticated api requests. `
|
I actually found my problem which was just a misconfiguration of the login route. Thanks, @adetwiler. |
Try to change order of your firewalls, example : |
Hello!
I was following the security.yml in the sandbox application and this bundle. However, I cannot seem to get past this firewall issue.
Symfony version: 2.5.5
security.yml
app/routing.yml
src/AcmeAPIBundle/Resources/config/routing.yml
Thanks!
The text was updated successfully, but these errors were encountered: