Пример #1
0
 /**
  * @expectedException \Exception
  * @expectedExceptionMessage The claim/header 'aud' is marked as critical but value is not set.
  */
 public function testInvalidCriticalJWS()
 {
     $loader = $this->getLoader();
     $jws = new JWS();
     $jws->setProtectedHeaderValue('crit', ['exp', 'nbf', 'aud']);
     $jws->setUnprotectedHeaderValue('exp', time() + 100);
     $jws->setProtectedHeaderValue('nbf', time() - 100);
     $loader->verify($jws);
 }