示例#1
0
 /**
  * {@inheritdoc}
  */
 public function checkJWT(JWTInterface $jwt)
 {
     $iss = $jwt->getIssuer();
     if (!is_null($iss) && !in_array($iss, $this->issuers)) {
         throw new \Exception('Issuer not allowed.');
     }
     return $this;
 }
示例#2
0
 /**
  * {@inheritdoc}
  */
 public function checkJWT(JWTInterface $jwt)
 {
     $sub = $jwt->getIssuer();
     if (!is_null($sub) && !$this->isSubjectValid($sub)) {
         throw new \Exception('Invalid subject.');
     }
     return $this;
 }