Before you begin, determine the contents of the custom authentication entries to be used in your request. See Custom authentication requests for detailed information on the supported syntax for custom authentication requests.

If your service does not support one of the standard authentication methods provided by the driver, you can define custom authentication requests to retrieve and exchange access tokens. You can configure custom authentication either by using the Autonomous REST Composer or by directly modifying the Model file. See Model file syntax and Custom authentication requests for information on configuring custom authentication directly in the Model file.

To configure custom authentication using the Autonomous REST Composer:

  1. Select the Set Authentication tab on the side menu.
  2. On the Connection tab, select Custom in the following fields:
    • Authentication Method(s)
    • Authentication Method
  3. From the ? menu in the upper right-hand corner, select REST Configuration. The contents of the Model file will display in the REST Configuration window.
  4. In the REST Configuration window, enter your custom authentication entries into the Model file. Note that all entries should use valid JSON syntax and be comma separated. For example:
    {
      "#options": {
        "authenticationMethod": {
          "default": "Custom",
          "choices": "Custom"
        }
      }
    }

    Becomes the following when adding a simple token request flow:

    {
      "#options": {
        "authenticationMethod": {
          "default": "Custom",
          "choices": "Custom"
        }
      },
      "#authentication" : [    
        "api-key={CustomAuthParams[1]}",
        {
            "credentials": {
                "username": "{user}",
                "password": "{password}",
                "company": "{customAuthParams[2]}"
            }
        },
        "POST http://{serverName}/bearertoken",
        "HEADER Authentication=Bearer {/access-token}"
       ]
    }
  5. Close the REST Configuration window. The Composer automatically saves your changes to the Model file.
  6. If applicable, provide values for the following fields:
    • User: Specify the user name used to connect to your REST service.
    • Password: Specify the password used to connect to your REST service.
    • Custom Authentication Parameters: Specify the list of parameter values used by custom authentication requests that are defined in the input REST file. This option allows you to configure parameter values used in custom authentication requests on a per connection basis, without having to hard code them, and securely pass them in a connection string or data source definition. See CustomAuthParams for details.
This completes configuring custom authentication using the Autonomous REST Composer.