tymondesigns/jwt-auth · error · Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException
{JWTException message}
Error message
{JWTException message} What it means
Error "{JWTException message}" thrown in tymondesigns/jwt-auth.
Source
Thrown at src/Http/Middleware/BaseMiddleware.php:72
/**
* Attempt to authenticate a user via the token in the request.
*
* @param \Illuminate\Http\Request $request
* @return void
*
* @throws \Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException
*/
public function authenticate(Request $request)
{
$this->checkForToken($request);
try {
if (! $this->auth->parseToken()->authenticate()) {
throw new UnauthorizedHttpException('jwt-auth', 'User not found');
}
} catch (JWTException $e) {
throw new UnauthorizedHttpException('jwt-auth', $e->getMessage(), $e, $e->getCode());
}
}
/**
* Set the authentication header.
*
* @param \Illuminate\Http\Response|\Illuminate\Http\JsonResponse $response
* @param string|null $token
* @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse
*/
protected function setAuthenticationHeader($response, $token = null)
{
$token = $token ?: $this->auth->refresh();
$response->headers->set('Authorization', 'Bearer '.$token);
return $response;
}
}View on GitHub (pinned to 6c70930a92)
When it happens
Trigger: Thrown at src/Http/Middleware/BaseMiddleware.php:72 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tymondesigns/jwt-auth@6c70930a92 (2026-08-21).
Data as JSON: /api/errors/17531265e85d7e81.
Report an issue: GitHub.