Using JWT or OAuth Token in Process

This is an example of using a JWT or OAuth token in a process.

 

  1. Get the token stored in Environment Extension and set it to the connector’s document property.

     

  2. Invoke the connector operation. Enable the option “Return Application Error Responses” so that any authentication errors are returned as application errors.

     

  3. Check if there is any authentication error code 401 in the Decision shape.

     

  4. If there is an authentication error, get the token from the Environment Extension from the Atmosphere API after a while in case the token is refreshing at the moment.