-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Use routes for security paths, instead of raw paths #2146
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -296,8 +296,8 @@ First, enable form login under your firewall: | |
pattern: ^/ | ||
anonymous: ~ | ||
form_login: | ||
login_path: /login | ||
check_path: /login_check | ||
login_path: login | ||
check_path: login_check | ||
|
||
.. code-block:: xml | ||
|
||
|
@@ -313,7 +313,7 @@ First, enable form login under your firewall: | |
<config> | ||
<firewall name="secured_area" pattern="^/"> | ||
<anonymous /> | ||
<form-login login_path="/login" check_path="/login_check" /> | ||
<form-login login_path="login" check_path="login_check" /> | ||
</firewall> | ||
</config> | ||
</srv:container> | ||
|
@@ -327,8 +327,8 @@ First, enable form login under your firewall: | |
'pattern' => '^/', | ||
'anonymous' => array(), | ||
'form_login' => array( | ||
'login_path' => '/login', | ||
'check_path' => '/login_check', | ||
'login_path' => 'login', | ||
'check_path' => 'login_check', | ||
), | ||
), | ||
), | ||
|
@@ -355,10 +355,11 @@ First, enable form login under your firewall: | |
'form_login' => array(), | ||
|
||
Now, when the security system initiates the authentication process, it will | ||
redirect the user to the login form (``/login`` by default). Implementing | ||
this login form visually is your job. First, create two routes: one that | ||
will display the login form (i.e. ``/login``) and one that will handle the | ||
login form submission (i.e. ``/login_check``): | ||
redirect the user to the login form (``/login`` by default). Implementing this | ||
login form visually is your job. First, the create two routes we used in the | ||
security configuration: the ``login`` route will display the login form (i.e. | ||
``/login``) and the ``login_check`` route will handle the login form | ||
submission (i.e. ``/login_check``): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are a few other references we should probably re-read and see if we need to update them. For example, if you search for So, see what other references you can find, and I'll look again when I merge this in. Between the 2 of us, we should be able to find everything :). |
||
|
||
.. configuration-block:: | ||
|
||
|
@@ -557,7 +558,7 @@ see :doc:`/cookbook/security/form_login`. | |
|
||
**1. Create the correct routes** | ||
|
||
First, be sure that you've defined the ``/login`` and ``/login_check`` | ||
First, be sure that you've defined the ``login`` and ``login_check`` | ||
routes correctly and that they correspond to the ``login_path`` and | ||
``check_path`` config values. A misconfiguration here can mean that you're | ||
redirected to a 404 page instead of the login page, or that submitting | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should update the XML and PHP formats here as well