Example #1
0
 /**
  * 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());
 }
Example #2
0
 /**
  * Constructor
  *
  * @param string ...$audiences One or more audiences
  */
 public function __construct(...$audiences)
 {
     parent::__construct(self::NAME_AUDIENCE, $audiences, new ContainsValidator());
 }
Example #3
0
 /**
  * Constructor
  *
  * @param string $id JWT unique identifier
  */
 public function __construct($id)
 {
     parent::__construct(self::NAME_JWT_ID, (string) $id, new EqualsValidator());
 }
Example #4
0
 /**
  * Constructor
  *
  * @param int $issue_time Issued at time
  */
 public function __construct($issue_time)
 {
     parent::__construct(self::NAME_ISSUED_AT, intval($issue_time));
 }
Example #5
0
 /**
  * Constructor
  *
  * @param string $issuer
  */
 public function __construct($issuer)
 {
     parent::__construct(self::NAME_ISSUER, (string) $issuer, new EqualsValidator());
 }
Example #6
0
 /**
  * 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());
 }