8000
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 df4266e commit 90de243Copy full SHA for 90de243
security/guard_authentication.rst
@@ -171,8 +171,11 @@ This requires you to implement six methods::
171
public function getCredentials(Request $request)
172
{
173
if (!$token = $request->headers->get('X-AUTH-TOKEN')) {
174
- // No token?
175
- $token = '';
+ // No token?
+ // Throwing an exception will cause authentication
176
+ // to fail and prevent other authenticators from
177
+ // attempting to authenticate.
178
+ throw new AuthenticationException('No token provided.');
179
}
180
181
// What you return here will be passed to getUser() as $credentials
0 commit comments