tymondesigns/jwt-auth · error · Tymon\JWTAuth\Exceptions\InvalidClaimException

Invalid value provided for claim [{claim}]

Error message

Invalid value provided for claim [{claim}]

What it means

Error "Invalid value provided for claim [{claim}]" thrown in tymondesigns/jwt-auth.

Source

Thrown at src/Claims/DatetimeTrait.php:55

    {
        if ($value instanceof DateInterval) {
            $value = Utils::now()->add($value);
        }

        if ($value instanceof DateTimeInterface) {
            $value = $value->getTimestamp();
        }

        return parent::setValue($value);
    }

    /**
     * {@inheritdoc}
     */
    public function validateCreate($value)
    {
        if (! is_numeric($value)) {
            throw new InvalidClaimException($this);
        }

        return $value;
    }

    /**
     * Determine whether the value is in the future.
     *
     * @param  mixed  $value
     * @return bool
     */
    protected function isFuture($value)
    {
        return Utils::isFuture($value, $this->leeway);
    }

    /**
     * Determine whether the value is in the past.

View on GitHub (pinned to 6c70930a92)

When it happens

Trigger: Thrown at src/Claims/DatetimeTrait.php:55 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tymondesigns/jwt-auth@6c70930a92 (2026-08-21). Data as JSON: /api/errors/7a48be19ab8590f4. Report an issue: GitHub.