Lines Matching refs:this

51         if(is_null($this->user)) return false;
52 if(is_null($this->userdata)) return false;
53 return $this->user;
62 if(is_null($this->userdata)) return false;
63 return $this->userdata;
74 $this->loadFromFile($user);
92 $this->instance = $instance;
96 …if($this->oauth_directlogin($INPUT->get->str('user'), $INPUT->get->str('sessionId'), $INPUT->get->…
97 if($this->loadUserDataFromSalesForce()) {
98 if($this->saveToFile()) {
99 … $log = array('message' => 'logged in via Salesforce', 'user' => $this->user);
112 if($this->oauth_finish($INPUT->get->str('code'), $instance)) {
113 if($this->loadUserDataFromSalesForce()) {
114 if($this->saveToFile()) {
115 … $log = array('message' => 'logged in via Salesforce', 'user' => $this->user);
130 $this->oauth_start($this->instance);
138 if(!$this->authdata) throw new Exception('No auth data to make API call');
141 $url = $this->authdata['instance_url'] . '/services/data/v24.0' . $endpoint;
145 $http->headers['Authorization'] = $this->authdata['access_token'];
167 if($this->oauth_refresh()) {
168 return $this->apicall($method, $endpoint, $data);
192 $this->instance = $instance;
198 'client_id' => $this->getConf('consumer key'),
199 'redirect_uri' => self::getLoginURL($this->instance),
203 … $url = $this->getConf('auth url') . '/services/oauth2/authorize?' . buildURLparams($data, '&');
217 $this->instance = $instance;
225 'client_id' => $this->getIConf('consumer key', $this->instance),
226 'client_secret' => $this->getIConf('consumer secret', $this->instance),
227 'redirect_uri' => self::getLoginURL($this->instance)
230 $url = $this->getConf('auth url') . '/services/oauth2/token';
241 $this->authdata = $resp;
249 if(!$this->authdata) throw new Exception('No auth data to refresh oauth token');
250 if(!isset($this->authdata['refresh_token'])) {
255 'refresh_token' => $this->authdata['refresh_token'],
256 'client_id' => $this->getIConf('consumer key', $this->instance),
257 'client_secret' => $this->getIConf('consumer secret', $this->instance)
260 …$url = $this->getConf('auth url') . '/services/oauth2/token?' . buildURLparams…
268 $this->authdata = $resp;
270 return $this->saveToFile();
283 $this->authdata = array(
298 $id = preg_replace('/^.*\//', '', $this->authdata['id']);
300 $resp = $this->apicall('GET', '/sobjects/User/' . rawurlencode($id));
303 $this->userdata = array(
311 $this->userdata['grps'][] = 'salesforce'.$this->instance;
312 $this->userdata['grps'][] = $conf['defaultgroup'];
314 $this->userdata['grps'] = array_unique($this->userdata['grps']);
315 $this->userdata['grps'] = array_filter($this->userdata['grps']);
317 $this->user = $this->transformMailToId($this->userdata['mail']);
333 $ownerDomain = $this->getConf('owner domain');
355 $this->userdata = unserialize(io_readFile($userdata, false));
361 $this->authdata = unserialize(io_readFile($authdata, false));
362 $this->instance = $this->authdata['dokuwiki-instance'];
367 $this->user = $user;
378 if(!$this->user) throw new Exception('No user info to save');
380 $this->authdata['dokuwiki-instance'] = $this->instance;
382 $userdata = getCacheName($this->user,'.sfuser');
383 $authdata = getCacheName($this->user,'.sfauth');
384 $ok1 = io_saveFile($userdata, serialize($this->userdata));
385 $ok2 = io_saveFile($authdata, serialize($this->authdata));
404 return $this->getConf($config.$postfix);