Authentication to a Different Host
  • 15 Nov 2022
  • Dark
    Light
  • PDF

Authentication to a Different Host

  • Dark
    Light
  • PDF

Article summary

Scenario

This system has a two-step authentication, but the request to retrieve a token is to a different host than the actual system we are integrating with. Think of this as a separate single sign-on system that returns a token that can be used with any other system.

Changes to the action.json File:

  • Notice the SSO object. This object allows you to define a protocol, host, and port to retrieve the token from. It overrides any information from the adapter properties or the callProperties.
  • The protocol and port can be omitted if they are the same as the adapter or call properties.

action.json Example

{
  "name": "getToken",
  "protocol": "REST",
  "method": "POST",
  "entitypath": "{base_path/{version}/authenication/login",
  "requestSchema": "tokenReqSchema.json",
  "responseSchema": "tokenRespSchema.json",
  "timeout": 0,
  "sendEmpty": false,
  "requestDatatype": "JSON",
  "responseDatatype": "PLAIN",
  "headers": {}, 
  "sso": {
    "protocol": "https",
    "host": "tokenhost",
    "port": 443
  },
  "responseObjects": [
    {
      "type": "default",
      "key": "",
      "mockFile": "mockdatafiles/getToken-default.json"
    }
  ]
},

Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.