diff --git a/testing/http_authentication.rst b/testing/http_authentication.rst index ff1f0d49a90..c6abf4d6a8d 100644 --- a/testing/http_authentication.rst +++ b/testing/http_authentication.rst @@ -116,6 +116,8 @@ needs:: // the firewall context defaults to the firewall name $firewallContext = 'secured_area'; + // you may need to use a different token class depending on your application. + // for example, when using Guard authentication you must instantiate PostAuthenticationGuardToken $token = new UsernamePasswordToken('admin', null, $firewallContext, array('ROLE_ADMIN')); $session->set('_security_'.$firewallContext, serialize($token)); $session->save();