diff options
author | Fabien Potencier <fabien.potencier@gmail.com> | 2016-06-28 18:26:56 +0200 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2016-06-28 18:26:56 +0200 |
commit | 2e1886476405d194d8903c116098af8e8ecf86c8 (patch) | |
tree | c8fc014587fc3758f8ceafa462f0293f5c740d63 | |
parent | ff1751179659761723a247da93e3113da5fba352 (diff) | |
parent | d1fe507f6dd2dc7c2349ce6b506af21545a7b386 (diff) | |
download | symfony-security-2e1886476405d194d8903c116098af8e8ecf86c8.zip symfony-security-2e1886476405d194d8903c116098af8e8ecf86c8.tar.gz symfony-security-2e1886476405d194d8903c116098af8e8ecf86c8.tar.bz2 |
Merge branch '3.0' into 3.1
* 3.0:
[CS] Respect PSR2 4.2
[Form] fix `empty_data` option in expanded `ChoiceType`
[Console] removed unneeded private methods
[Security] [Guard] Improve comment with working example
sync min email validator version
[TwigBridge] Fix inconsistency in LintCommand help
explicitly forbid e-mail validator 2.0 or higher
Fixed SymfonyQuestionHelper multi-choice with defaults
[DoctrineBridge] Don't use object IDs in DoctrineChoiceLoader when passing a value closure
Differentiate between the first time a progress bar is displayed and subsequent times
finished previous commit
No more exception for malformed input name
fix post_max_size_message translation
[Process] Fix pipes cleaning on Windows
Avoid phpunit 5.4 warnings on getMock
[Form] Add exception to FormRenderer about non-unique block names
[Form] Consider a violation even if the form is not submitted
-rw-r--r-- | Guard/GuardAuthenticatorInterface.php | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Guard/GuardAuthenticatorInterface.php b/Guard/GuardAuthenticatorInterface.php index 947594c..b28f06d 100644 --- a/Guard/GuardAuthenticatorInterface.php +++ b/Guard/GuardAuthenticatorInterface.php @@ -39,11 +39,15 @@ interface GuardAuthenticatorInterface extends AuthenticationEntryPointInterface * Whatever value you return here will be passed to getUser() and checkCredentials() * * For example, for a form login, you might: - * - * return array( - * 'username' => $request->request->get('_username'), - * 'password' => $request->request->get('_password'), - * ); + * + * 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: * |