Using http-connector to access oAuth Secured APIs

We have a number of REST services that use oAuth Bearer tokens to access. Is there a pattern in Camunda for a task to be able to get a token from an authority before calling into the service? Given the nature of the workflows and the potential timescales, it would need to be something that runs before each given task to avoid token expiration.

1 Like

@joelhess we have done a execution listener that runs at the Start of the task and gets the key and saves it as a local variable in the Task.

We have also done a reusable script that gets the token and passed into the secondary function: this was done using the pattern from jsoup: Replacing Http-Connector with Jsoup usage

1 Like