REST API authorisation with OAuth

The REST adapter supports accessing REST APIs that require an OAuth access token in the request. Users can supply the OAuth access token request details in the service configuration. The supported configuration parameters are as follows:

oauth JSON property
Property Description Mandatory Default

server

The access token endpoint URL of the authorisation server.

YES

-

requestParameters

The request parameters to be supplied with the access token request. By default, the 'grant_type' parameter with the value 'client_credentials' will be set. See below for details.

NO

-

headers

The headers to be supplied with the access token request. By default, the 'Content-Type' header with the value 'application/x-www-form-urlencoded' will be set. See below for details.

NO

-

method

The HTTP method to be used to request the access token. Options available, one of: GET, POST.

NO

'POST'

postContent

A string value to be posted to the OAuth access token request.

NO

-

requestParameters JSON property
Property Description Mandatory Default

clientId

The client ID that will be supplied as request parameter.

NO

-

clientSecret

The client secret that will be supplied as request parameter.

NO

-

grantType

The grant type for the OAuth access token request.

NO

client_credentials

additionalParameters

Any additional request parameters, supplied as key/value pairs in string format to be supplied with the request.

NO

-

headers JSON property
Property Description Mandatory Default

clientId

The client ID, which will be Base64 encoded with 'clientSecret' and supplied as a Basic Authorization header. If the 'Authorization' header needs to be set directly, setting 'clientId' can be omitted and the Authorization parameter can be supplied under the additionalHeaders field.

NO

-

clientSecret

The client secret, which will be Base64 encoded with 'clientId' and supplied as a Basic Authorization header. If the 'Authorization' header needs to be set directly, setting 'clientSecret' can be omitted and the Authorization parameter can be supplied under the additionalHeaders field.

NO

-

contentType

The content type to be supplied in the header.

NO

application/x-www-form-urlencoded

additionalHeaders

Any additional headers supplied as key/value pairs in string format to be supplied with the request

NO

-

The clientId and clientSecret values can be supplied either in the request parameters or in the headers, depending on the requirements of the authorisation server.