/** * Try the verify call on a JWT with no expiration defined in the header * @expectedException \Psecio\Jwt\Exception\DecodeException */ public function testVerifyJwtSignatureNotProcessBefore() { $key = 'test'; $header = new Header($key); $jwt = new Jwt($header); $jwt->issuer('http://example.org')->audience('http://example.com')->expireTime(time() + 3600)->notBefore(time() + 3600); $claims = (object) $jwt->getClaims()->toArray(); $parts = explode('.', $jwt->encode()); $signature = $jwt->base64Decode($parts[2]); $header = (object) $jwt->getHeader()->toArray(); $this->assertTrue($jwt->verify($key, $header, $claims, $signature)); }