{"record":{"id":"cd92321a1970e0a0","repo":"phalcon/cphalcon","slug":"invalid-audience","errorCode":null,"errorMessage":"Invalid Audience","messagePattern":"Invalid Audience","errorType":"exception","errorClass":"InvalidAudience","httpStatus":null,"severity":"error","filePath":"phalcon/Encryption/Security/JWT/Builder.zep","lineNumber":267,"sourceCode":"     * \"aud\" claim when this claim is present, then the JWT MUST be\n     * rejected.  In the general case, the \"aud\" value is an array of case-\n     * sensitive strings, each containing a StringOrURI value.  In the\n     * special case when the JWT has one audience, the \"aud\" value MAY be a\n     * single case-sensitive string containing a StringOrURI value.  The\n     * interpretation of audience values is generally application specific.\n     * Use of this claim is OPTIONAL.\n     *\n     * @param mixed $audience\n     *\n     * @return static\n     * @throws ValidatorException\n     */\n    public function setAudience(var audience) -> <static>\n    {\n        var aud;\n\n        if typeof audience !== \"string\" && typeof audience !== \"array\" {\n            throw new InvalidAudience();\n        }\n\n        if typeof audience === \"string\" {\n            let aud = [audience];\n        } else {\n            let aud = audience;\n        }\n\n        return this->setClaim(Enum::AUDIENCE, aud);\n    }\n\n    /**\n     * Sets the content type header 'cty'\n     *\n     * @param string $contentType\n     *\n     * @return static\n     */","sourceCodeStart":249,"sourceCodeEnd":285,"githubUrl":"https://github.com/phalcon/cphalcon/blob/b7419de9cd0a8a3f48441ead84c9f8415d463e25/phalcon/Encryption/Security/JWT/Builder.zep#L249-L285","documentation":"Error \"Invalid Audience\" thrown in phalcon/cphalcon.","triggerScenarios":"Thrown at phalcon/Encryption/Security/JWT/Builder.zep:267 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":"b7419de9cd0a8a3f48441ead84c9f8415d463e25","analyzedAt":"2026-08-21T06:21:18.811Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}