diff --git a/htdocs/includes/OAuth/Common/Storage/DoliStorage.php b/htdocs/includes/OAuth/Common/Storage/DoliStorage.php index 60af1f631c6..145bc2add2b 100644 --- a/htdocs/includes/OAuth/Common/Storage/DoliStorage.php +++ b/htdocs/includes/OAuth/Common/Storage/DoliStorage.php @@ -236,8 +236,16 @@ class DoliStorage implements TokenStorageInterface */ public function clearAllTokens() { - // TODO - $this->conf->remove($this->key); + // TODO Remove token using a loop on each $service + /* + $servicepluskeyforprovider = $service; + if (!empty($this->keyforprovider)) { + // We clean the keyforprovider after the - to be sure it is not present + $servicepluskeyforprovider = preg_replace('/\-'.preg_quote($this->keyforprovider, '/').'$/', '', $servicepluskeyforprovider); + // Now we add the keyforprovider + $servicepluskeyforprovider .= '-'.$this->keyforprovider; + } + */ // allow chaining return $this; @@ -332,7 +340,6 @@ class DoliStorage implements TokenStorageInterface { // TODO // get previously saved tokens - //$states = $this->conf->get($this->stateKey); if (is_array($this->states) && array_key_exists($service, $this->states)) { unset($this->states[$service]); @@ -351,7 +358,6 @@ class DoliStorage implements TokenStorageInterface public function clearAllAuthorizationStates() { // TODO - //$this->conf->remove($this->stateKey); // allow chaining return $this;