skip to main content
Using the Driver : Authentication : OAuth 2.0 Authentication : Password Grant
  

Try DataDirect Drivers Now
Password Grant
The authentication flow for the Password grant exchanges user credentials for the access token at the location specified by the Token URI option. For added security, client credentials, such as the client ID and client secret, might also be authenticated for some flows.
To configure the driver to use an authentication flow for a password grant:
*Configure the minimum required options required for a connection:
*If you are using an input REST file, set the REST Config File (RestConfigFile) option to provide the name and location of the input REST file. For example, C:/path/to/zendesk.rest.
*If you are using the REST Sample Path method, set the REST Sample Path (RestSamplePath) option to specify the endpoint that the want to connect to and sample. For example, https://example.com/countries/.
*Set the Authentication Method (AuthenticationMethod) option to OAuth2.
*Set the User Name (LogonID) option to specify the user name that is used to fetch the access token from the Token endpoint.
*Set the Password (Password) option to specify the password used to fetch the access token.
*Set the Token URI (TokenURI) option to specify the endpoint used to exchange authentication credentials for access tokens. For example, https://example.com/oauth2/authorize/.
*If required by your REST service, set the Client ID (ClientID) option to specify the client ID key for your application.
*If required by your REST service, set the Client Secret (ClientSecret) option to specify the client secret for your application.
Important: The client secret is a confidential value used to authenticate the application to the server. To prevent unauthorized access, this value must be securely maintained.
*Optionally, set the Scope (Scope) option to specify a space-separated list of OAuth scopes to limit the permissions granted by the access token.
The following examples demonstrate a basic Zendesk session using a password grant:
Using a connection URL:
DRIVER=DataDirect 8.0 Autonomous REST Connector;AuthenticationMethod=OAuth2;
RestConfigFile=C:/path/to/zendesk.rest;
TokenURI=https://accounts.google.com/o/oauth2/token;LogonID=jjones@example.com;
Password=secretstuff;
Using a odbc.ini file with a 32-bit driver:
Driver=ODBCHOME/lib/ivautorestxx.so;
Description=My OAuth2 Autonomous REST Data Source
AuthenticationMethod=OAuth2
RestConfigFile=C:/path/to/zendesk.rest
TokenURI=https://accounts.google.com/o/oauth2/token
LogonID=jjones@example.com
Password=secretstuff