Uploaded image for project: 'Java Script UI (App and Dialog Fields)'
  1. Java Script UI (App and Dialog Fields)
  2. JSFIELD-21

Add a way to call restClients out of the JS-Field

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: High High
    • 2.0.3
    • 1.2.1
    • None

      For security reasons it would be super handy if it would be possible to handle api calls to third party systems which contain a constant token via the Magnolia backend. Specifically I would like to use a light-development defined RestClient. 

      The idea would be to send a postMessage to the backend like:

      parent.window.postMessage(
          {
            action: 'callRestClient',
            correlationId,
            value: <restClientName>,
            body: <restBody>
          },
          '*'
        ); 

      And then use the EventListener to receive the results:

      window.addEventListener('message', function (event) {
        if (event.data.action === 'restCall') {
          console.log(event.data.response);
        },
        false
      ); 

        Acceptance criteria

              tmiyar Teresa Miyar
              tobias.kerschbaum Tobias Kerschbaum
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: