summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole/rest
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2017-12-20 11:05:50 +0000
committerramon <ramongomez@us.es>2017-12-20 11:05:50 +0000
commit4d06fd4b688c1c70c8f5fc3e527a79ae29519054 (patch)
tree5618db504f14478fc843954cb6bc4ad37826ebaf /admin/WebConsole/rest
parentd7ece95096f4215eacf2e6adff3863164fac38bb (diff)
#718: Adaptar la API REST que atiende notificaciones de ''logout'' de OGAgent.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5539 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'admin/WebConsole/rest')
-rw-r--r--admin/WebConsole/rest/ogagent.php4
-rw-r--r--admin/WebConsole/rest/opengnsys-api.yml6
2 files changed, 7 insertions, 3 deletions
diff --git a/admin/WebConsole/rest/ogagent.php b/admin/WebConsole/rest/ogagent.php
index f2e8d5d9..8acbdd4f 100644
--- a/admin/WebConsole/rest/ogagent.php
+++ b/admin/WebConsole/rest/ogagent.php
@@ -215,8 +215,6 @@ $app->post('/ogagent/loggedout',
$input = json_decode($app->request()->getBody());
$ip = htmlspecialchars($input->ip);
$user = htmlspecialchars($input->user);
- if (isset($input->ostype)) $osType = htmlspecialchars($input->ostype);
- if (isset($input->osversion)) $osVersion = str_replace(",", ";", htmlspecialchars($input->osversion));
// Check sender agent type and IP address consistency (same as parameter value).
if (empty(preg_match('/^python-requests\//', $_SERVER['HTTP_USER_AGENT'])) or $ip !== $_SERVER['REMOTE_ADDR']) {
throw new Exception("Bad OGAgent: ip=$ip, sender=".$_SERVER['REMOTE_ADDR'].", agent=".$_SERVER['HTTP_USER_AGENT']);
@@ -242,7 +240,7 @@ EOD;
$rs->Cerrar();
if (!is_null($id)) {
// Log activity, respond to client and continue processing.
- writeLog("User logged out: ip=$ip, user=$user, os=$osType:$osVersion.");
+ writeLog("User logged out: ip=$ip, user=$user.");
$response = "";
jsonResponseNow(200, $response);
} else {
diff --git a/admin/WebConsole/rest/opengnsys-api.yml b/admin/WebConsole/rest/opengnsys-api.yml
index 81325af6..0c9575a2 100644
--- a/admin/WebConsole/rest/opengnsys-api.yml
+++ b/admin/WebConsole/rest/opengnsys-api.yml
@@ -1117,6 +1117,12 @@ paths:
type: string
user:
type: string
+ language:
+ type: string
+ ostype:
+ type: string
+ osversion:
+ type: string
responses:
"200":
description: Successful operation