skip to main content
Using the Driver : Using Security : Authentication : Configuring OAuth 2.0 authentication
  

Try DataDirect Drivers Now
Configuring OAuth 2.0 authentication
The driver supports OAuth 2.0, which is an open protocol for token-based authentication. OAuth 2.0 allows you to authenticate without specifying a user ID or password, eliminating the risk of exposing them to unauthorized access. It uses an access token, accompanied by the values discussed below, to authenticate to a Google BigQuery instance. See "Generating access token and refresh token" to know how to obtain an access token.
To configure the driver to use OAuth 2.0 authentication, set the following connection options:
*Set the Authentication Method option to oauth2.
*Set at least one of the following options:
*Access Token: Set this to specify the access token you have obtained to authenticate to Google BigQuery.
*Refresh Token: Set this to specify the refresh token you have obtained to authenticate to Google BigQuery.
If a value for the Access Token option is not specified, the driver uses the value of the Refresh Token option to make a connection. If both values are not specified, the driver cannot make a successful connection. If both are specified, the driver uses the Access Token value; however, if the Access Token value expires, it uses the Refresh Token value to generate a new Access Token value.
*Set the Client ID option to specify the consumer key for your application.
*Set the Client Secret option to specify the consumer secret for your application.
*Optionally, set the Scope option to specify the OAuth scope. It limits the permissions granted by an access token.
The following examples show how to connect to a Google BigQuery instance using OAuth2.0 authentication.
Using a connection string:
DRIVER=DataDirect 8.0 Google BigQuery;AuthenticationMethod=oauth2;
Project=myproject;Dataset=mydataset;
AccessToken=abcdefghi12345678;RefreshToken=wxyz123456789;
ClientID=123abc.apps.googleusercontent.com;ClientSecret=ab123xy
Using the odbc.ini file:
Driver=ODBCHOME/lib/xxgbq28.yy
AuthenticationMethod=oauth2
Project=myproject
Dataset=mydataset
AccessToken=abcdefghi12345678
RefreshToken=wxyz123456789
ClientID=123abc.apps.googleusercontent.com
ClientSecret=ab123xy