Skip to content

Commit

Permalink
Update custom_authenticator.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
94noni authored Aug 12, 2024
1 parent 319b504 commit 27a4f50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions security/custom_authenticator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ method that fits most use-cases::
*/
public function supports(Request $request): ?bool
{
return $request->headers->has('X-AUTH-TOKEN');
return $request->headers->has('auth-token');
}

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

0 comments on commit 27a4f50

Please sign in to comment.