phalcon/cphalcon · error · InvalidExpirationTime

Invalid Expiration Time

Error message

Invalid Expiration Time

What it means

Error "Invalid Expiration Time" thrown in phalcon/cphalcon.

Source

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

    /**
     * The "exp" (expiration time) claim identifies the expiration time on
     * or after which the JWT MUST NOT be accepted for processing.  The
     * processing of the "exp" claim requires that the current date/time
     * MUST be before the expiration date/time listed in the "exp" claim.
     * Implementers MAY provide for some small leeway, usually no more than
     * a few minutes, to account for clock skew.  Its value MUST be a number
     * containing a NumericDate value.  Use of this claim is OPTIONAL.
     *
     * @param int $timestamp
     *
     * @return static
     * @throws ValidatorException
     */
    public function setExpirationTime(int timestamp) -> <static>
    {
        if timestamp < time() {
            throw new InvalidExpirationTime();
        }

        return this->setClaim(Enum::EXPIRATION_TIME, timestamp);
    }

    /**
     * The "jti" (JWT ID) claim provides a unique identifier for the JWT.
     * The identifier value MUST be assigned in a manner that ensures that
     * there is a negligible probability that the same value will be
     * accidentally assigned to a different data object; if the application
     * uses multiple issuers, collisions MUST be prevented among values
     * produced by different issuers as well.  The "jti" claim can be used
     * to prevent the JWT from being replayed.  The "jti" value is a case-
     * sensitive string.  Use of this claim is OPTIONAL.
     *
     * @param string $jwtId
     *
     * @return static

View on GitHub (pinned to b7419de9cd)

When it happens

Trigger: Thrown at phalcon/Encryption/Security/JWT/Builder.zep:310 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/56c6b0d55e26bb58. Report an issue: GitHub.