Skip to content

Commit 9d624c6

Browse files
committed
Merge branch '3.4' into 4.4
* 3.4: Replace former SecurityContext argument by TokenStorage
2 parents 10f5cf0 + 26b54b4 commit 9d624c6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

components/security/authorization.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,15 +221,17 @@ which contains request matchers and a corresponding set of attributes that
221221
are required for the current user to get access to the application::
222222

223223
use Symfony\Component\HttpFoundation\RequestMatcher;
224+
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;
224225
use Symfony\Component\Security\Http\AccessMap;
225226
use Symfony\Component\Security\Http\Firewall\AccessListener;
226227

227228
$accessMap = new AccessMap();
229+
$tokenStorage = new TokenStorage();
228230
$requestMatcher = new RequestMatcher('^/admin');
229231
$accessMap->add($requestMatcher, ['ROLE_ADMIN']);
230232

231233
$accessListener = new AccessListener(
232-
$securityContext,
234+
$tokenStorage,
233235
$accessDecisionManager,
234236
$accessMap,
235237
$authenticationManager

0 commit comments

Comments
 (0)