Skip to content

Commit 27a4f50

Browse files
authored
Update custom_authenticator.rst
1 parent 319b504 commit 27a4f50

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

security/custom_authenticator.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ method that fits most use-cases::
3737
*/
3838
public function supports(Request $request): ?bool
3939
{
40-
return $request->headers->has('X-AUTH-TOKEN');
40+
return $request->headers->has('auth-token');
4141
}
4242

4343
public function authenticate(Request $request): Passport
4444
{
45-
$apiToken = $request->headers->get('X-AUTH-TOKEN');
45+
$apiToken = $request->headers->get('auth-token');
4646
if (null === $apiToken) {
4747
// The token header was empty, authentication fails with HTTP Status
4848
// Code 401 "Unauthorized"

0 commit comments

Comments
 (0)