Skip to content

[Security] Deprecate always_authenticate_before_granting option #15526

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
Jul 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions components/security/authentication.rst
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,11 @@ request if you have session-based authentication, if ``always_authenticate_befor
is enabled or if token is not authenticated before AccessListener is invoked.
See ``security.interactive_login`` below if you need to do something when a user *actually* logs in.

.. deprecated:: 5.4

The ``always_authenticate_before_granting`` option was deprecated in
Symfony 5.4 and it will be removed in Symfony 6.0.

When a provider attempts authentication but fails (i.e. throws an ``AuthenticationException``),
a ``security.authentication.failure`` event is dispatched. You could listen on
the ``security.authentication.failure`` event, for example, in order to log
Expand Down
5 changes: 5 additions & 0 deletions reference/configuration/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ always_authenticate_before_granting

**type**: ``boolean`` **default**: ``false``

.. deprecated:: 5.4

The ``always_authenticate_before_granting`` option was deprecated in
Symfony 5.4 and it will be removed in Symfony 6.0.

If ``true``, the user is asked to authenticate before each call to the
``isGranted()`` method in services and controllers or ``is_granted()`` from
templates.
Expand Down