Using OAuth with REST Integration
  • 06 Aug 2024
  • 2 Minutes to read
  • Dark
    Light

Using OAuth with REST Integration

  • Dark
    Light

Article summary

Overview 

When creating a REST Integration Service, Decisions offers a number of authentication types to give access to the Server being integrated with, without having to provide login or Account information each time. One such feature is the use of OAuth. OAuth is an open standard for providing secured delegated access. The following document discusses how to use OAuth in conjunction with a REST service. 

Version 8 Endpoints for SAML, OpenID, and OAuth
  • LoginURL - [base]:[port]/Login 
  • LogoutURL - [base]:[port]/Logout 
  • SAML - [base]:[port]/SAML/AssertionConsumer 
  • TokenHandler - [base]:[port]/HandleTokenResponse
An example of an endpoint would appear in the address bar as -> localhost:81/Logout 
The port number is ONLY needed if Decisions is installed to a non-standard port, which would be anything other than port 80 for HTTP or port 443 for HTTPS.

Establishing a Provider

To gain access to OAuth settings and the ability to create an OAuth Token, users must first establish an OAuth Provider.  This setting is established in the System > Integrations > Providers Folder, via selecting the ADD OAUTH PROVIDER button within the Folder. 

Once selected the user may define the Provider's Name and a Description, and then, the following Provider Settings

OAuth VersionAllows the user to define which version of OAuth is used in the Provider; either OAuth1x or OAuth2.
Token Request URLAllows the ability to request a Token from the Integrated Service. 
Token Refresh URL (Optional)Allows the ability to access the API again, after expiration without inputting additional credentials. 
Authorize URLEnables access to the API.  
Callback URLThe URL that the API returns to after running, typically to make any data changes or to POST to the API,.  
Default Consumer KeyUsed as a means to identify the user or service that interacts with the API. 
Default Consumer Secret Key Acts in conjunction with the Default Consumer Key as a password to allow access to the API's functions. 

OAuth Settings

After establishing a Provider, OAuth settings can be used with a REST Integration by scrolling to the Authentication Settings in the Add REST Service screen that appears when a user creates a new REST Service via the CREATE DATAYPES/INTEGRATION button in a Designer Folder. 

From the Authentication settings, toggling Use OAuth Settings triggers the appearance of the OAuth panel below. 

The OAuth panel provides users with the following three options for OAuth : 

  • Use Custom Tag in Auth Header (OAuth is Default): Allows the user to input a custom OAuth header tag. 

  • Use Static OAuth Token: Provides the user a drop-down menu that allows the user to select a pre-made OAuth Token. Without this enabled, the Token will be available as the Input. 
It is advised to use a Dynamic Token rather than a Static one. 

Note: The OAuth Token drop-down requires at least one pre-configuration of an OAuth token. To properly create and set up an OAuth Token, see Creating OAuth Tokens.

  • Direct OAuth1 Signed Request: 

Requires the consumer key, initial token data, PFX Filename, and password

For further information on Integrations, visit the Decisions Forum.

Was this article helpful?