Skip to content

Use same URL for login form and check #354

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

Merged
merged 1 commit into from
Jun 23, 2016

Conversation

wouterj
Copy link
Member

@wouterj wouterj commented Jun 21, 2016

The Security Form login listener will only intercept the request when it's a POST request, otherwise the controller will be executed. Using the same URL makes things a bit easier, removes the need for the weird controller (which is visited, but should not be executed) and makes things similar to other forms.

Related doc tickets:

@@ -25,8 +25,7 @@
class SecurityController extends Controller
{
/**
* @Route("/login", name="security_login_form")
* @Method("GET")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This had to be removed, as the router will error when we submit the form. It wasn't very usefull anyways...

@javiereguiluz
Copy link
Member

👍 I like this change a lot! Thanks Wouter.

@xabbuh
Copy link
Member

xabbuh commented Jun 23, 2016

👍

@javiereguiluz
Copy link
Member

It's merged now! Thanks.

@javiereguiluz javiereguiluz merged commit b7705cb into symfony:master Jun 23, 2016
javiereguiluz added a commit that referenced this pull request Jun 23, 2016
This PR was merged into the master branch.

Discussion
----------

Use same URL for login form and check

The Security Form login listener will only intercept the request when it's a POST request, otherwise the controller will be executed. Using the same URL makes things a bit easier, removes the need for the weird controller (which is visited, but should not be executed) and makes things similar to other forms.

Related doc tickets:
 * symfony/symfony-docs#6126
 * symfony/symfony-docs#6143

Commits
-------

b7705cb Use same URL for login form and check
@wouterj wouterj deleted the login-check-same-url branch June 23, 2016 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants