How Do I Use Custom OAuth 2.0 Authentication with a REST Service Activity?

To use custom OAuth 2.0 authentication in a REST Service activity, do the procedure in this topic.

Prerequisites

  • A custom implementation of OAuth 2.0 that is programmatic and does not require a sign-in screen where a user must enter credentials.

    If your implementation of OAuth uses a sign-in screen, this document does not apply to your requirements. For help with this issue, contact AgilePoint Professional Services.

Good to Know

  • The REST Service process activity supports some OAuth 2.0 authentication types out of the box. However, it does not support custom OAuth 2.0 authentication.
  • There are many ways you can configure and connect to an OAuth service. The AgilePoint NX Product Documentation provides general information about how to configure some types of programmatic connections within AgilePoint NX. For help more information, contact AgilePoint Professional Services.

How to Start

  1. On the App Explorer screen, do one of these:

Procedure

  1. In your process, add a REST Service activity.

    REST Service activity
  2. Configure the REST Service activity to send a request to the custom OAuth 2.0 authentication provider endpoint to generate an OAuth access token.
  3. In the Schema Mapper, create aprocess data variable to store the access token received from the custom OAuth 2.0 authentication provider.

    Store OAuth access token
  4. Add an Update Process Data activity after your REST Service activity.

    Update Process Data activity
  5. Configure the Update Process Data activity to change the value of the process data variable to the value of the OAuth access token with syntax that conforms to OAuth 2.0 authentication header specifications.

    Update Process Data Variable
  6. Add a REST Service activity to use the custom authentication and execute your REST method.

    Add REST Service activity
  7. Configure the REST Service activity to use the process data variable with your custom OAuth access token authentication header.

    Configure Process Data Variable
  8. Configure the REST Service activity perform the operations you want with your REST service.