public function onMatched(array &$parameters, AgaviExecutionContainer $container)
 {
     $validation = $container->getValidationManager();
     $errors = array();
     if (isset($parameters['authkey'])) {
         $container->setAttribute('flag', true, 'org.icinga.api.auth');
         try {
             $this->user->doAuthKeyLogin($parameters['authkey']);
         } catch (AgaviSecurityException $e) {
             $errors[] = 'Log in failed by authkey';
         }
     }
     if ($this->checkAuthorisation() == false) {
         $errors[] = self::INSUFFICIENT_MSG;
     }
     if (count($errors)) {
         $container->setAttributeByRef('errors', $errors, 'org.icinga.api.auth');
         $container->setAttribute('success', false, 'org.icinga.api.auth');
         return false;
     }
     $container->setAttribute('success', true, 'org.icinga.api.auth');
     return true;
 }
 private function getValidationInfo(AgaviExecutionContainer $container)
 {
     $vm = $container->getValidationManager();
     $result = array();
     $result['has_errors'] = $vm->hasErrors();
     $result['severities'] = array(100 => 'INFO', 200 => 'SILENT', 300 => 'NOTICE', 400 => 'ERROR', 500 => 'CRITICAL');
     $result['incidents'] = $vm->getIncidents();
     return $result;
 }