/** * Constructor * * @param int $exp_time Expiration time */ public function __construct($exp_time) { // validate that claim is after the constraint (reference time) parent::__construct(self::NAME_EXPIRATION_TIME, intval($exp_time), new GreaterValidator()); }
/** * Constructor * * @param string ...$audiences One or more audiences */ public function __construct(...$audiences) { parent::__construct(self::NAME_AUDIENCE, $audiences, new ContainsValidator()); }
/** * Constructor * * @param string $id JWT unique identifier */ public function __construct($id) { parent::__construct(self::NAME_JWT_ID, (string) $id, new EqualsValidator()); }
/** * Constructor * * @param int $issue_time Issued at time */ public function __construct($issue_time) { parent::__construct(self::NAME_ISSUED_AT, intval($issue_time)); }
/** * Constructor * * @param string $issuer */ public function __construct($issuer) { parent::__construct(self::NAME_ISSUER, (string) $issuer, new EqualsValidator()); }
/** * Constructor * * @param int $not_before Not before time */ public function __construct($not_before) { // validate that claim is before or at the constraint (reference time) parent::__construct(self::NAME_NOT_BEFORE, intval($not_before), new LessOrEqualValidator()); }