protected function auth() { if (!$this->isAuth) { $auth = new \Espo\Core\Utils\Auth($this->app->getContainer()); $auth->useNoAuth(); $this->isAuth = true; } return $this->isAuth; }
public function postActionDestroyAuthToken($params, $data) { $token = $data['token']; if (empty($token)) { throw new BadRequest(); } $auth = new \Espo\Core\Utils\Auth($this->getContainer()); return $auth->destroyAuthToken($token); }