Пример #1
0
 public function testIsValid_true_customValidator()
 {
     $mutableJwt = new MutableJwt($this->claims, $this->secret, $this->header);
     $jwt = new Jwt($mutableJwt->encode(), $this->secret);
     $jwt->addValidator(function () {
         return true;
     });
     $this->assertTrue($jwt->isValid());
 }
Пример #2
0
 public function testEncode()
 {
     $jwt = new Jwt($this->claims, $this->secret, $this->header);
     $this->assertEquals($this->srcJwt, $jwt->encode());
 }