code: public function authenticateAction() 
      {
  		$this->getResponse()
  			->setStatusCode(Response::STATUS_CODE_201);
  		
          $adapter = $this->zfcUserAuthentication()->getAuthAdapter();
          $result = $adapter->prepareForAuthentication($this->getRequest());
  
          // Return early if an adapter returned a response
          if ($result instanceof Response) {
              return $result;
          }
  
          $auth = $this->zfcUserAuthentication()->getAuthService()->authenticate($adapter);
          
          if (!$auth->isValid()) {
  			$data = array('id' => 'Credenziali non valide');
  			$this->getResponse()
  				->setStatusCode(Response::STATUS_CODE_500);
              $adapter->resetAdapters();
  			return new JsonModel($data);
          }
          
          $data = array('id' => true);
  		return new JsonModel($data);
      }
docs: (non-PHPdoc)
  @see \ZfcUser\Controller\UserController::authenticateAction()