Integration Gateway: querying with user's access-token / getting OIDC access-token

Hi everyone,

I’d like to query a 3rd party server and get the data from it using user’s OAuth2 creds.
So far, I’ve found that I can

  • login user via OAuth to the 3rd party (I’m using OIDC provider)
  • create an Integration Gateway and then set the header via JS processor -input.Set('request',modifiedRequest)
    But I’m not sure how to access the User’s struct or take the access token through that.

Is it possible to use OAuth-middlewared client with the user’s creds, or get the access token manually somehow?

As a side note, 2023.9 says it’s possible to get the opts in JS processor’s context, however it’s been filtered out for quite some time.
docs: Process Requests with JavaScript :: Corteza Docs