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::
165
165
class TokenAuthenticator extends AbstractGuardAuthenticator
166
166
{
167
167
/**
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.
170
171
*/
171
172
public function getCredentials(Request $request)
172
173
{
173
174
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 ;
176
177
}
177
178
178
179
// What you return here will be passed to getUser() as $credentials
You can’t perform that action at this time.
0 commit comments