The driver supports the authentication methods described in this section. By default, the driver is configured to use no authentication (AuthenticationMethod=None).
Basic Authentication
Basic authentication uses user IDs, passwords, and HTTP headers to authenticate.
Configure the Config or Sample connection option attributes.
Set the AuthenticationMethod option to Basic.
(Optional) Set the AuthHeader option to specify the name of the HTTP header used for authentication. The default is Authorization.
Set the LogonID option to specify your logon ID.
Set the Password option to specify your password.
The following examples demonstrate a session using a REST file with basic authentication enabled and AuthHeader set to the default:
[ODBC Data Sources]
AutoREST=DataDirect 8.0 Autonomous REST Connector
HTTP Header Authentication passes security tokens via the HTTP headers to authenticate. In some scenarios, the REST services may also authenticate the user ID. To configure the driver to use HTTP header authentication:
Configure the Config or Sample connection option attributes.
Set the AuthenticationMethod option to HttpHeader.
(Optional) Set the AuthHeader option to specify the name of the HTTP header used for authentication. The default is Authorization.
Set the SecurityToken option to specify the security token required to make a connection to your endpoint. For example, XaBARTsLZReM.
The following examples demonstrates a session using a REST file with HTTP header authentication enabled and AuthHeader is set to the default.
[ODBC Data Sources]
AutoREST=DataDirect 8.0 Autonomous REST Connector
[AutoREST]
Driver=ODBCHOME/lib/ivautorestxx.so
Description=My Autonomous REST Data Source
AuthenticationMethod=HttpHeader
Config=C:\path\to\myrest.rest
SecurityToken=XaBARTsLZReM
URL Parameter Authentication
URL Parameter Authentication authenticates by passing security tokens using URLs. In some scenarios, the REST services may also authenticate the user ID. To configure the driver to use HTTP header authentication:
Configure the Config or Sample options.
Set the AuthenticationMethod option to UrlParameter.
Set the AuthParam option to specify the name of the URL parameter used to pass the security token. For example, apikey.
Set the SecurityToken option to specify the security token required to make a connection to your endpoint. For example, XaBARTsLZReM.
The following examples demonstrates a session using a REST file with URL parameter authentication enabled.
[ODBC Data Sources]
AutoREST=DataDirect 8.0 Autonomous REST Connector