Skip to content

Commit 60debdb

Browse files
committed
Merge branch '6.2' into 6.3
* 6.2: Adding more details on `action` and `method` Consistent naming of `FormLoginAuthenticator`
2 parents 6c0b18e + e1958b8 commit 60debdb

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

forms.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -695,8 +695,9 @@ Set the ``label`` option on fields to define their labels explicitly::
695695
Changing the Action and HTTP Method
696696
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
697697

698-
By default, a form will be submitted via an HTTP POST request to the same
699-
URL under which the form was rendered. When building the form in the controller,
698+
By default, the ``<form>`` tag is rendered with a ``method="post"`` attribute,
699+
and no ``action`` attribute. This means that the form is submitted via an HTTP
700+
POST request to the same URL under which it was rendered. When building the form,
700701
use the ``setAction()`` and ``setMethod()`` methods to change this::
701702

702703
// src/Controller/TaskController.php

security.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ Form Login
660660

661661
Most websites have a login form where users authenticate using an
662662
identifier (e.g. email address or username) and a password. This
663-
functionality is provided by the *form login authenticator*.
663+
functionality is provided by the built-in :class:`Symfony\\Component\\Security\\Http\Authenticator\\FormLoginAuthenticator`.
664664

665665
First, create a controller for the login form:
666666

@@ -691,7 +691,7 @@ First, create a controller for the login form:
691691
}
692692
}
693693
694-
Then, enable the form login authenticator using the ``form_login`` setting:
694+
Then, enable the ``FormLoginAuthenticator`` using the ``form_login`` setting:
695695

696696
.. configuration-block::
697697

@@ -784,8 +784,8 @@ Edit the login controller to render the login form:
784784
}
785785
}
786786
787-
Don't let this controller confuse you. Its job is only to *render* the form:
788-
the ``form_login`` authenticator will handle the form *submission* automatically.
787+
Don't let this controller confuse you. Its job is only to *render* the form.
788+
The ``FormLoginAuthenticator`` will handle the form *submission* automatically.
789789
If the user submits an invalid email or password, that authenticator will store
790790
the error and redirect back to this controller, where we read the error (using
791791
``AuthenticationUtils``) so that it can be displayed back to the user.
@@ -857,7 +857,7 @@ To review the whole process:
857857
#. The ``/login`` page renders login form via the route and controller created
858858
in this example;
859859
#. The user submits the login form to ``/login``;
860-
#. The security system (i.e. the ``form_login`` authenticator) intercepts the
860+
#. The security system (i.e. the ``FormLoginAuthenticator``) intercepts the
861861
request, checks the user's submitted credentials, authenticates the user if
862862
they are correct, and sends the user back to the login form if they are not.
863863

0 commit comments

Comments
 (0)