Proxy client for access to module functions without receiving a new token

Client connection is carried out in modules.registry.globals.di in deploy.json:

  "modules": {
    "registry": {
      "globals": {
          "apiGateWay": {
            "module": "modules/rest/client/GateWay",
            "options": {
              "log": "ion://sysLog",
              "base": "/registry-ajax-api",
              "clientId": "ext@system",
              "clientSecret": "ion-demo",
              "tokenPath": "/rest/token",
              "endPoint": "[[rest.endPoint]]",
              "definition": {
                "paths": {
                  "/rest/echo-token": {
                    "post": true,
                    "get": true

Example of a request to rest/echo-token through a proxy client:

curl -X POST --cookie-jar 1.txt -d username="demo@local" -d password="ion-demo" http://localhost:8888/auth
curl -X GET --cookie 1.txt

example of a request in dnt: test/modules/rest/gateway.spec.js

/Checking rest-api proxy