Ejemplo n.º 1
0
 public function __construct($module, $method)
 {
     parent::__construct($module, $method);
     //初始化数据
     $this->key = \Hnust\input('key');
     $this->uid = \Hnust\input('uid');
     $this->sid = \Hnust\input('sid');
     $this->secret = \Hnust\input('secret');
     $this->passwd = \Hnust\input('passwd');
     //权限验证
     $this->auth();
 }
Ejemplo n.º 2
0
Archivo: Api.php Proyecto: qious/Hnust
 public function __construct($module, $method)
 {
     parent::__construct($module, $method);
     $this->access = Config::getAccess($this->module, $this->method);
     //初始化数据
     $this->token = \Hnust\input('server.HTTP_TOKEN');
     $this->sid = \Hnust\input('sid');
     $this->passwd = \Hnust\input('passwd');
     $this->page = \Hnust\input('page/d', 1);
     $this->page = $this->page < 1 ? 1 : $this->page;
     //权限验证
     $this->auth();
 }
Ejemplo n.º 3
0
Archivo: Auth.php Proyecto: qious/Hnust
 public function __construct($module, $method)
 {
     parent::__construct($module, $method);
     $this->access = Config::getAccess($this->module, $this->method);
     $this->NMStatus = 'Admin' === $this->module ? Config::STATE_ADMIN : Config::STATE_NORMAL;
     //初始化数据
     $this->token = \Hnust\input('cookie.token', \Hnust\input('token'));
     $this->key = \Hnust\input('get.key', \Hnust\input('post.key'));
     $this->sid = \Hnust\input('get.sid', \Hnust\input('post.sid'));
     $this->uid = \Hnust\input('uid');
     $this->passwd = \Hnust\input('passwd');
     $this->page = \Hnust\input('page/d', 1);
     $this->page = $this->page < 1 ? 1 : $this->page;
     //初始化缓存
     $this->authCache = new Cache('auth');
     //权限验证
     $this->auth();
 }