8000 Authenticator class example - fixing comment · symfony/symfony-docs@df4266e · GitHub
[go: up one dir, main page]

Skip to content

Commit df4266e

Browse files
committed
Authenticator class example - fixing comment
1 parent a5832a2 commit df4266e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

security/guard_authentication.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,14 @@ This requires you to implement six methods::
165165
{
166166
/**
167167
* Called on every request. Return whatever credentials you want to
168-
* be passed to getUser(). Returning null will cause authentication
169-
* to be successful, skipping the rest of the authentication process.
168+
* be passed to getUser(). Returning null will cause this authenticator
169+
* to be skipped.
170170
*/
171171
public function getCredentials(Request $request)
172172
{
173173
if (!$token = $request->headers->get('X-AUTH-TOKEN')) {
174-
// No token?
175-
$token = null;
174+
// No token?
175+
$token = '';
176176
}
177177

178178
// What you return here will be passed to getUser() as $credentials

0 commit comments

Comments
 (0)
0