[Security] [Guard] Improve comment with working example

This commit is contained in:
Jean Pasdeloup 2016-06-22 14:10:03 +02:00 committed by Fabien Potencier
parent 90151ef5c5
commit b36fc32ea8

View File

@ -40,10 +40,14 @@ interface GuardAuthenticatorInterface extends AuthenticationEntryPointInterface
*
* For example, for a form login, you might:
*
* if ($request->request->has('_username')) {
* return array(
* 'username' => $request->request->get('_username'),
* 'password' => $request->request->get('_password'),
* );
* } else {
* return;
* }
*
* Or for an API token that's on a header, you might use:
*