phalcon/cphalcon · error · EmptyPassphrase

Invalid passphrase (empty)

Error message

Invalid passphrase (empty)

What it means

Error "Invalid passphrase (empty)" thrown in phalcon/cphalcon.

Source

Thrown at phalcon/Encryption/Security/JWT/Builder.zep:210

    /**
     * @return string|null
     */
    public function getSubject() -> string | null
    {
        return this->claims->get(Enum::SUBJECT, null, "string");
    }

    /**
     * @return Token
     * @throws ValidatorException
     */
    public function getToken() -> <Token>
    {
        var claims, encodedClaims, encodedHeaders, encodedSignature,
            headers, signature, signatureHash;

        if empty this->passphrase {
            throw new EmptyPassphrase();
        }

        let encodedClaims    = this->doEncodeUrl(this->encode->__invoke(this->getClaims())),
            claims           = new Item(this->getClaims(), encodedClaims),
            encodedHeaders   = this->doEncodeUrl(this->encode->__invoke(this->getHeaders())),
            headers          = new Item(this->getHeaders(), encodedHeaders),
            signatureHash    = this->signer->sign(
                encodedHeaders . "." . encodedClaims,
                this->passphrase
            ),
            encodedSignature = this->doEncodeUrl(signatureHash),
            signature        = new Signature(signatureHash, encodedSignature);

        return new Token(headers, claims, signature);
    }

    /**
     * @return static

View on GitHub (pinned to b7419de9cd)

When it happens

Trigger: Thrown at phalcon/Encryption/Security/JWT/Builder.zep:210 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of phalcon/cphalcon@b7419de9cd (2026-08-21). Data as JSON: /api/errors/ab78d4b1a1197136. Report an issue: GitHub.