public function handle(ApiDoc $annotation, array $annotations, Route $route, \ReflectionMethod $method)
 {
     foreach ($annotations as $annot) {
         if ($annot instanceof PreAuthorize) {
             $annotation->setAuthentication(true);
         } elseif ($annot instanceof Secure) {
             $annotation->setAuthentication(true);
             $annotation->setAuthenticationRoles(is_array($annot->roles) ? $annot->roles : explode(',', $annot->roles));
         }
     }
 }
 public function handle(ApiDoc $annotation, array $annotations, Route $route, \ReflectionMethod $method)
 {
     foreach ($annotations as $annot) {
         if ($annot instanceof Cache) {
             $annotation->setCache($annot->getMaxAge());
         } elseif ($annot instanceof Security) {
             $annotation->setAuthentication(true);
         }
     }
 }