{"record":{"id":"ec6b8d8e4ade39fb","repo":"tymondesigns/jwt-auth","slug":"token-not-provided","errorCode":null,"errorMessage":"Token not provided","messagePattern":"Token not provided","errorType":"http","errorClass":"Symfony\\Component\\HttpKernel\\Exception\\UnauthorizedHttpException","httpStatus":401,"severity":"error","filePath":"src/Http/Middleware/BaseMiddleware.php","lineNumber":51,"sourceCode":"     * @return void\n     */\n    public function __construct(JWTAuth $auth)\n    {\n        $this->auth = $auth;\n    }\n\n    /**\n     * Check the request for the presence of a token.\n     *\n     * @param  \\Illuminate\\Http\\Request  $request\n     * @return void\n     *\n     * @throws \\Symfony\\Component\\HttpKernel\\Exception\\BadRequestHttpException\n     */\n    public function checkForToken(Request $request)\n    {\n        if (! $this->auth->parser()->setRequest($request)->hasToken()) {\n            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');","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/tymondesigns/jwt-auth/blob/6c70930a92710d97e8e52b182fca2176097f33be/src/Http/Middleware/BaseMiddleware.php#L33-L69","documentation":"Error \"Token not provided\" thrown in tymondesigns/jwt-auth.","triggerScenarios":"Thrown at src/Http/Middleware/BaseMiddleware.php:51 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"}