Beispiel #1
0
 protected function auth()
 {
     if (!$this->isAuth) {
         $auth = new \Espo\Core\Utils\Auth($this->app->getContainer());
         $auth->useNoAuth();
         $this->isAuth = true;
     }
     return $this->isAuth;
 }
Beispiel #2
0
 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);
 }