Skip to content

Commit b45137d

Browse files
committed
minor #15526 [Security] Deprecate always_authenticate_before_granting option (javiereguiluz)
This PR was merged into the 5.4 branch. Discussion ---------- [Security] Deprecate always_authenticate_before_granting option Fixes #15497. I couldn't find any occurrences in the docs about the deprecated 4th and 5th argument of `AuthorizationChecker` or about the deprecated 5th argument of `AccessListener`, so there's nothing to do about them. Commits ------- 74f39b2 [Security] Deprecate always_authenticate_before_granting option
2 parents 21cfd89 + 74f39b2 commit b45137d

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

components/security/authentication.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,11 @@ request if you have session-based authentication, if ``always_authenticate_befor
302302
is enabled or if token is not authenticated before AccessListener is invoked.
303303
See ``security.interactive_login`` below if you need to do something when a user *actually* logs in.
304304

305+
.. deprecated:: 5.4
306+
307+
The ``always_authenticate_before_granting`` option was deprecated in
308+
Symfony 5.4 and it will be removed in Symfony 6.0.
309+
305310
When a provider attempts authentication but fails (i.e. throws an ``AuthenticationException``),
306311
a ``security.authentication.failure`` event is dispatched. You could listen on
307312
the ``security.authentication.failure`` event, for example, in order to log

reference/configuration/security.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ always_authenticate_before_granting
5858

5959
**type**: ``boolean`` **default**: ``false``
6060

61+
.. deprecated:: 5.4
62+
63+
The ``always_authenticate_before_granting`` option was deprecated in
64+
Symfony 5.4 and it will be removed in Symfony 6.0.
65+
6166
If ``true``, the user is asked to authenticate before each call to the
6267
``isGranted()`` method in services and controllers or ``is_granted()`` from
6368
templates.

0 commit comments

Comments
 (0)