示例#1
0
文件: JwtTest.php 项目: maarky/jwt
 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
文件: JwtTest.php 项目: maarky/jwt
 public function testEncode()
 {
     $jwt = new Jwt($this->claims, $this->secret, $this->header);
     $this->assertEquals($this->srcJwt, $jwt->encode());
 }