We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3721b9c commit 5704906Copy full SHA for 5704906
security/guard_authentication.rst
@@ -165,10 +165,10 @@ This requires you to implement several methods::
165
return null;
166
}
167
168
- // if a User is returned, checkCredentials() is called
169
- return $this->em->getRepository(User::class)
170
- ->findOneBy(['apiToken' => $credentials])
171
- ;
+ // The "username" in this case is the apiToken, see the key `property`
+ // of `your_db_provider` in `security.yaml`.
+ // If this returns a user, checkCredentials() is called next:
+ return $userProvider->loadUserByUsername($apiToken);
172
173
174
public function checkCredentials($credentials, UserInterface $user)
0 commit comments