Commit 56c7e5d9db933244ac54cbeae9b60885da132626

Authored by Mark Holtzhausen
1 parent 5fec8b8b

Added permanentURL parameter to bypass single token validity

webservice/clienttools/ajaxhandler.php
... ... @@ -13,6 +13,7 @@ class ajaxHandler{
13 13 public $authenticator=NULL;
14 14 public $noAuthRequireList=array();
15 15 public $standardServices=array('system');
  16 + public $parameters=array();
16 17  
17 18 protected $errors=array();
18 19  
... ... @@ -70,6 +71,7 @@ class ajaxHandler{
70 71 $add_params=array_merge($_GET,$_POST);
71 72 unset($add_params['request'],$add_params['datasource']);
72 73 $this->request['parameters']=array_merge($this->request['parameters'],$add_params);
  74 + $this->parameters=$this->request['parameters'];
73 75  
74 76 if(!$this->auth['debug'])$this->ret->includeDebug=false;
75 77  
... ... @@ -183,6 +185,7 @@ class ajaxHandler{
183 185  
184 186 //TODO: Alter this to verify whether token was used before or whether it is new
185 187 protected function checkTokenValidity(){
  188 + if($this->parameters['permanentURL'])return true;
186 189 $token=$this->auth['token'];
187 190 $tokenList=$_SESSION['JAPI_TOKEN_STORE']?$_SESSION['JAPI_TOKEN_STORE']:array();
188 191 $valid=!in_array($token,$tokenList);
... ...