diff options
| author | manzerbredes <loic.guegan_secondary@yahoo.fr> | 2016-03-16 12:43:07 +0100 |
|---|---|---|
| committer | manzerbredes <loic.guegan_secondary@yahoo.fr> | 2016-03-16 12:43:07 +0100 |
| commit | 4dea72976bbef1715cf06fae6c8f6f881b856f00 (patch) | |
| tree | 17e1c09b04cda1ff955f1824b14da6939b91b2f5 /server/core/LibOverride | |
| parent | 26d10bc0fa4befbac54453228ae1ce89021bdec2 (diff) | |
| parent | 11dc33c440f97410a2358f7e615d2adc5e69f072 (diff) | |
Merge branch 'develop' into loic
Diffstat (limited to 'server/core/LibOverride')
| -rwxr-xr-x | server/core/LibOverride/genTokenOptions.php | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/server/core/LibOverride/genTokenOptions.php b/server/core/LibOverride/genTokenOptions.php index 18d880f..bdae8a6 100755 --- a/server/core/LibOverride/genTokenOptions.php +++ b/server/core/LibOverride/genTokenOptions.php @@ -75,6 +75,12 @@ class genTokenOptions $this->optionsGlobal['Identity'] = $options; } + public function revokeIdentityToken(){ + $token = $this->unserializeToken($this->backup['Identity']['token']); + $this->optionsGlobal['Common']['identityService']->revokeToken($token->id); + + } + public function loadIdentityBackup($opt){ $options = $this->optionsGlobal['Common']; $options['catalogName'] = 'false'; @@ -123,6 +129,12 @@ class genTokenOptions $this->optionsGlobal['Image'] = $options; } + public function revokeImageToken(){ + $token = $this->unserializeToken($this->backup['Image']['token']); + $this->optionsGlobal['Common']['identityService']->revokeToken($token->id); + + } + public function loadImageBackup($opt){ $options = $this->optionsGlobal['Common']; $options['catalogName'] = 'glance'; @@ -157,7 +169,7 @@ class genTokenOptions $stack = HandlerStack::create(); - $stack->push(Middleware::authHandler($options['authHandler'], $token)); + $stack->push(Middleware::authHandler($options['authHandler'], $token)); $this->addDebugMiddleware($options, $stack); @@ -170,6 +182,12 @@ class genTokenOptions $this->optionsGlobal['Network'] = $options; } + public function revokeNetworkToken(){ + $token = $this->unserializeToken($this->backup['Network']['token']); + $this->optionsGlobal['Common']['identityService']->revokeToken($token->id); + + } + public function loadNetworkBackup($opt){ $options = $this->optionsGlobal['Common']; $options['catalogName'] = 'neutron'; @@ -217,6 +235,12 @@ class genTokenOptions $this->optionsGlobal['Compute'] = $options; } + public function revokeComputeToken(){ + $token = $this->unserializeToken($this->backup['Compute']['token']); + $this->optionsGlobal['Common']['identityService']->revokeToken($token->id); + + } + public function loadComputeBackup($opt){ $options = $this->optionsGlobal['Common']; @@ -245,7 +269,7 @@ class genTokenOptions private function saveBackup($name, $data){ $token = $this->serializeToken($data["token"]); $path = "core/LibOverride/projectTokenData/".$token['saved']["project"]["name"]; - error_log(print_r($path, true), 0); + //error_log(print_r($path, true), 0); file_put_contents("core/LibOverride/projectTokenData/".$token['saved']["project"]["name"], serialize($token['saved'])); $this->backup["roles"] = $token["roles"]; $this->backup["project"] = $token['saved']["project"]["name"]; |
