Hello there,
We have a requirement to use OAuth2.0 access token for the RESTful web service AFX connector.
Could anyone please help me with the configuration under the settings tab for the parameters and how to it for the login capability?
thanks,
Neeraja Mahajan
The basic settings you need for any OAuth2.0 client are:
You need to get the above details from your endpoint (depending on what it is).
Depending on your endpoint, if you need to pass extra parameters for the OAuth2.0 token request, use the Add More Parameters button.
After you fill in your OAuth2.0 details, click the Get OAuth2.0 Access Token so the connector can get the token.
Make sure your endpoint provides some sort of refresh token along with the access token so that the IGL OAuth service can auto-refresh the access token before it expires. For example: MS Azure Graph API requires adding the offline_access scope so that it returns a refresh token with the access token.
Here is an example from my lab's MS Azure Graph API connector:
To reference the OAuth2.0 token in your capabilities, all you need to do is add an extra header as seen below:
The header and variable names/values are case sensitive. Please copy paste them exactly as shown below.
Authorization: Bearer ${Settings.access_token}
Here is an example from one of my capabilties for the same connector above:
If you only need the OAuth2.0 token to call your capabilities, then you do not need to use the Login capability at all.
You only need to use the Login capability if your endpoint requires the OAuth2.0 token first to generate a session token, then use that session token in the actual capabilities.
Hope this helps!