{"record":{"id":"a629cb57e45209e8","repo":"tymondesigns/jwt-auth","slug":"user-not-found","errorCode":null,"errorMessage":"User not found","messagePattern":"User not found","errorType":"http","errorClass":"Symfony\\Component\\HttpKernel\\Exception\\UnauthorizedHttpException","httpStatus":401,"severity":"error","filePath":"src/Http/Middleware/BaseMiddleware.php","lineNumber":69,"sourceCode":"            throw new UnauthorizedHttpException('jwt-auth', 'Token not provided');\n        }\n    }\n\n    /**\n     * Attempt to authenticate a user via the token in the request.\n     *\n     * @param  \\Illuminate\\Http\\Request  $request\n     * @return void\n     *\n     * @throws \\Symfony\\Component\\HttpKernel\\Exception\\UnauthorizedHttpException\n     */\n    public function authenticate(Request $request)\n    {\n        $this->checkForToken($request);\n\n        try {\n            if (! $this->auth->parseToken()->authenticate()) {\n                throw new UnauthorizedHttpException('jwt-auth', 'User not found');\n            }\n        } catch (JWTException $e) {\n            throw new UnauthorizedHttpException('jwt-auth', $e->getMessage(), $e, $e->getCode());\n        }\n    }\n\n    /**\n     * Set the authentication header.\n     *\n     * @param  \\Illuminate\\Http\\Response|\\Illuminate\\Http\\JsonResponse  $response\n     * @param  string|null  $token\n     * @return \\Illuminate\\Http\\Response|\\Illuminate\\Http\\JsonResponse\n     */\n    protected function setAuthenticationHeader($response, $token = null)\n    {\n        $token = $token ?: $this->auth->refresh();\n        $response->headers->set('Authorization', 'Bearer '.$token);\n","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/tymondesigns/jwt-auth/blob/6c70930a92710d97e8e52b182fca2176097f33be/src/Http/Middleware/BaseMiddleware.php#L51-L87","documentation":"Error \"User not found\" thrown in tymondesigns/jwt-auth.","triggerScenarios":"Thrown at src/Http/Middleware/BaseMiddleware.php:69 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6c70930a92710d97e8e52b182fca2176097f33be","analyzedAt":"2026-08-21T02:16:37.040Z","schemaVersion":2},"datasetVersion":"2026-08-21T03:17:12.404Z"}