File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -165,14 +165,15 @@ This requires you to implement six methods::
165165 class TokenAuthenticator extends AbstractGuardAuthenticator
166166 {
167167 /**
168- * Called on every request. Return whatever credentials you want,
169- * or null to stop authentication.
168+ * Called on every request. Return whatever credentials you want to
169+ * be passed to getUser(). Returning null will cause this authenticator
170+ * to be skipped.
170171 */
171172 public function getCredentials(Request $request)
172173 {
173174 if (!$token = $request->headers->get('X-AUTH-TOKEN')) {
174- // no token? Return null and no other methods will be called
175- return ;
175+ // No token?
176+ $token = null ;
176177 }
177178
178179 // What you return here will be passed to getUser() as $credentials
You can’t perform that action at this time.
0 commit comments