{"record":{"id":"c7a3ebf3ef3ee9b3","repo":"tymondesigns/jwt-auth","slug":"a-token-is-required","errorCode":null,"errorMessage":"A token is required","messagePattern":"A token is required","errorType":"exception","errorClass":"Tymon\\JWTAuth\\Exceptions\\JWTException","httpStatus":null,"severity":"error","filePath":"src/JWT.php","lineNumber":318,"sourceCode":"     */\n    public function unsetToken()\n    {\n        $this->token = null;\n\n        return $this;\n    }\n\n    /**\n     * Ensure that a token is available.\n     *\n     * @return void\n     *\n     * @throws \\Tymon\\JWTAuth\\Exceptions\\JWTException\n     */\n    protected function requireToken()\n    {\n        if (! $this->token) {\n            throw new JWTException('A token is required');\n        }\n    }\n\n    /**\n     * Set the request instance.\n     *\n     * @param  \\Illuminate\\Http\\Request  $request\n     * @return $this\n     */\n    public function setRequest(Request $request)\n    {\n        $this->parser->setRequest($request);\n\n        return $this;\n    }\n\n    /**\n     * Set whether the subject should be \"locked\".","sourceCodeStart":300,"sourceCodeEnd":336,"githubUrl":"https://github.com/tymondesigns/jwt-auth/blob/6c70930a92710d97e8e52b182fca2176097f33be/src/JWT.php#L300-L336","documentation":"Error \"A token is required\" thrown in tymondesigns/jwt-auth.","triggerScenarios":"Thrown at src/JWT.php:318 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"}