Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4badda9

Browse files
author
Robin Chalas
committed
feature #24291 [SecurityBundle] Reset the authentication token between requests (derrabus)
This PR was merged into the 3.4 branch. Discussion ---------- [SecurityBundle] Reset the authentication token between requests | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #23984 | License | MIT | Doc PR | N/A Follow-up to #24155. This PR resets the token storage, making sure there's no user logged in at the beginning of a new request. Commits ------- e46b366 Reset the authentication token between requests.
2 parents e84d2d0 + e46b366 commit 4badda9

File tree

1 file changed

+3
-1
lines changed
  • src/Symfony/Bundle/SecurityBundle/Resources/config

1 file changed

+3
-1
lines changed

src/Symfony/Bundle/SecurityBundle/Resources/config/security.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
</service>
2222
<service id="Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface" alias="security.authorization_checker" />
2323

24-
<service id="security.token_storage" class="Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage" public="true" />
24+
<service id="security.token_storage" class="Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage" public="true">
25+
<tag name="kernel.reset" method="setToken" />
26+
</service>
2527
<service id="Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface" alias="security.token_storage" />
2628

2729
<service id="security.user_value_resolver" class="Symfony\Bundle\SecurityBundle\SecurityUserValueResolver">

0 commit comments

Comments
 (0)