skip to main content
Using the Driver : Authentication : Custom authentication
  

Try DataDirect Drivers Now

Custom authentication

If your service does not support one of the standard authentication methods provided by the driver, you can define a custom authentication requests using the input REST file.
Before you start: Define your custom authentication requests in the input REST file. For details, see "Custom authentication requests."
To configure the driver to use custom authentication requests:
*Set the REST Config File (RestConfigFile) option to provide the name and location of the input REST file. For example, C:/path/to/myrest.rest.
*Set the Authentication Method (AuthenticationMethod) option to Custom. Note that Custom is the default when a custom authentication request is defined in the input REST file.
*Optionally, set the Custom Auth Params (CustomAuthParams) option to specify the list of parameters to be used by the authentication requests defined in the input REST file. Note that these values must be specified in the order that corresponds to the index location cited by the variable in the REST file. For example, the following customAuthParams variable points to the second (2) index:
"company": "{customAuthParams[2]}"
To successfully authenticate, the second value specified should be the value for the company field:
CustomAuthParams=123XYZ456abc789;My Company Inc;www.example.com
*If applicable, set the Host Name (HostName) option to set the host name portion of the HTTP endpoint to which you send requests. This value corresponds to the [ServerName] variable in the REST file.
*If required by your service, set the User Name (LogonID) option to specify your logon ID. This value corresponds to the [User] variable in the REST file.
*If required by your service, set the Password (Password) option to specify your password. This value corresponds to the [Password] variable in the REST file.
*Optionally, specify values for any additional options you want to configure.
The following examples demonstrate sessions using custom authentication, including the optional CustomAuthParams, HostName, LogonID, and Password options.
For a connection URL:
DRIVER=DataDirect 8.0 Autonomous REST Connector;CustomAuthParams=123XYZ456abc789;
My Company Inc;path/to/endpoint;HostName=https://example.com;
RestConfigFile=C:/path/to/myrest.rest;LogonID=jsmith;Password=secret"
Using a odbc.ini file with a 32-bit driver:
Driver=ODBCHOME/lib/ivautorestxx.so;
Description=My Autonomous REST Data Source
CustomAuthParams=123XYZ456abc789;My Company Inc;path/to/endpoint;
HostName=https://example.com
RestConfigFile=C:/path/to/myrest.rest
LogonID=jsmith
Password=secret