-
-
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 1 commit
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 | ||
|
||
|
@@ -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:: | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -218,16 +218,16 @@ The Login Form and Process | |
~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
* ``login_path`` (type: ``string``, default: ``/login``) | ||
This is the URL that the user will be redirected to (unless ``use_forward`` | ||
This is the path that the user will be redirected to (unless ``use_forward`` | ||
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. Should this be expanded now to say something like "This is the path or route" that the user will be redirected to? |
||
is set to ``true``) when he/she tries to access a protected resource | ||
but isn't fully authenticated. | ||
|
||
This URL **must** be accessible by a normal, un-authenticated user, else | ||
This path **must** be accessible by a normal, un-authenticated user, else | ||
you may create a redirect loop. For details, see | ||
":ref:`Avoid Common Pitfalls<book-security-common-pitfalls>`". | ||
|
||
* ``check_path`` (type: ``string``, default: ``/login_check``) | ||
This is the URL that your login form must submit to. The firewall will | ||
This is the path that your login form must submit to. The firewall will | ||
intercept any requests (``POST`` requests only, by default) to this URL | ||
and process the submitted login credentials. | ||
|
||
|
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