Skip to content

Commit a46a856

Browse files
committed
Update guard-authentication.rst
1 parent 168072b commit a46a856

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cookbook/security/guard-authentication.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,12 @@ This requires you to implement six methods::
189189

190190
public function getUser($credentials, UserProviderInterface $userProvider)
191191
{
192-
$apiToken = $credentials['token'];
192+
$apiKey = $credentials['token'];
193193

194194
// if null, authentication will fail
195195
// if a User object, checkCredentials() is called
196196
return $this->em->getRepository('AppBundle:User')
197-
->findOneBy(array('apiToken' => $apiToken));
197+
->findOneBy(array('apiKey' => $apiKey));
198198
}
199199

200200
public function checkCredentials($credentials, UserInterface $user)

0 commit comments

Comments
 (0)