コード例 #1
0
ファイル: user.php プロジェクト: nick-catanchin-ie/common
 public function before()
 {
     parent::before();
     $key = Core::request('user_token');
     //try authenticate the user
     if ($key == NULL or ($this->user = Auth::instance()->api_login($key)) == FALSE) {
         $this->_error(__('Wrong Api User Token'), 401);
     }
 }
コード例 #2
0
ファイル: auth.php プロジェクト: nick-catanchin-ie/common
 public function before()
 {
     parent::before();
     $key = Core::request('apikey');
     //try normal api key not user
     if ($key != Core::config('general.api_key')) {
         $this->_error(__('Wrong Api Key'), 401);
     }
 }
コード例 #3
0
 public function before()
 {
     parent::before();
     if (Theme::get('premium') != 1) {
         $this->_error('You need a premium theme to use the API', 401);
     }
     $key = Core::request('user_token');
     //try authenticate the user
     if ($key == NULL or ($this->user = Auth::instance()->api_login($key)) == FALSE) {
         $this->_error(__('Wrong Api User Token'), 401);
     }
 }
コード例 #4
0
 public function before()
 {
     parent::before();
     if (Theme::get('premium') != 1) {
         $this->_error('You need a premium theme to use the API', 401);
     }
     $key = Core::request('apikey');
     //try normal api key not user
     if ($key != Core::config('general.api_key')) {
         $this->_error(__('Wrong Api Key'), 401);
     }
 }