[Security] [Guard] Improve comment with working example
This commit is contained in:
parent
90151ef5c5
commit
b36fc32ea8
@ -39,11 +39,15 @@ interface GuardAuthenticatorInterface extends AuthenticationEntryPointInterface
|
|||||||
* Whatever value you return here will be passed to getUser() and checkCredentials()
|
* Whatever value you return here will be passed to getUser() and checkCredentials()
|
||||||
*
|
*
|
||||||
* For example, for a form login, you might:
|
* For example, for a form login, you might:
|
||||||
*
|
*
|
||||||
* return array(
|
* if ($request->request->has('_username')) {
|
||||||
* 'username' => $request->request->get('_username'),
|
* return array(
|
||||||
* 'password' => $request->request->get('_password'),
|
* '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:
|
* Or for an API token that's on a header, you might use:
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user