Пример #1
0
 /**
  * @param JwtContext $context
  * @throws \Exception
  */
 public function handleContext(JwtContext $context)
 {
     if (false == $this->isBuilt) {
         throw new \RuntimeException('Must call build() method first to be able to handle context');
     }
     parent::handleContext($context);
 }
 /**
  * @param JwtContext $context
  * @throws \BWC\Component\JwtApiBundle\Error\JwtException
  */
 public function handleContext(JwtContext $context)
 {
     if (!$context->getRequestJwt()) {
         throw new JwtException('Missing request jwt to filter by');
     }
     foreach ($this->filter as $claim => $value) {
         if ($context->getRequestJwt()->get($claim) != $value) {
             return;
         }
     }
     parent::handleContext($context);
 }