Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 9286c14

Browse files
DIOHz0rajsb85
authored andcommittedOct 25, 2017
feat(client): added killSession endpoint
1 parent 157586f commit 9286c14

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
 

‎src/GlpiProject/API/Rest/Client.php

+14
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,20 @@ public function initSessionByUserToken($userToken) {
266266
return true;
267267
}
268268

269+
/**
270+
* Kill client session.
271+
* @return bool
272+
* @throws Exception
273+
*/
274+
public function killSession() {
275+
$params['headers'] = $this->addTokens();
276+
$response = $this->doHttpRequest('get', 'killSession', $params);
277+
if (!$response->getStatusCode() != 200) {
278+
throw new Exception('session_token seems invalid');
279+
}
280+
return true;
281+
}
282+
269283
public function getSimpleEndpoints() {
270284
return $this->simpleEndpoints;
271285
}

0 commit comments

Comments
 (0)