[JSFIELD-21] Add a way to call restClients out of the JS-Field Created: 14/Dec/22  Updated: 30/Oct/23  Resolved: 30/Oct/23

Status: Resolved
Project: Java Script UI (App and Dialog Fields)
Component/s: None
Affects Version/s: 1.2.1
Fix Version/s: 2.0.3

Type: New Feature Priority: High
Reporter: Tobias Kerschbaum Assignee: Teresa Miyar
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

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
); 


 Comments   
Comment by Mykola [ 25/Aug/23 ]

It's a great feature for more secure calls (even in author instance).
When it will be released?

Comment by Teresa Miyar [ 28/Aug/23 ]

Hi,

Updated the fix version to 2.0.3, we do not have dates for this release yet, we will try to have it by the end of next month.

Generated at Mon Feb 12 02:16:20 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.