Exemplo n.º 1
0
 public function testSetType_testType()
 {
     $jwt = new Jwt($this->srcJwt, $this->secret);
     $this->assertEquals('XXX', $jwt->setType('XXX')->getHeader('typ')->get());
 }
Exemplo n.º 2
0
Arquivo: Jwt.php Projeto: maarky/jwt
 public function getImmutable() : ImmutableJwt
 {
     $jwt = new ImmutableJwt($this->encode());
     if (!is_null($this->secret)) {
         $jwt->setSecret($this->getSecret()->get());
     }
     $validators = $this->getValidators();
     if ($validators->isDefined()) {
         $jwt->addValidator(...$validators->get());
     }
     $jwt->trusted = false;
     return $jwt;
 }