Skip to content

Commit

Permalink
If context is defined, it is used instead of the firewall
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslan-fidesio authored and wouterj committed Jul 9, 2016
1 parent 812dbfd commit 2545203
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cookbook/testing/simulating_authentication.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ with a request. The following example demonstrates this technique::
{
$session = $this->client->getContainer()->get('session');

$firewall = 'secured_area';
$firewall = 'secured_area'; // put here firewalls context if defined
$token = new UsernamePasswordToken('admin', null, $firewall, array('ROLE_ADMIN'));
$session->set('_security_'.$firewall, serialize($token));
$session->save();
Expand Down

0 comments on commit 2545203

Please sign in to comment.