Out in the world, most of the data sources guarded with OAuth based authorization to secure access to data. OAuth specification supports different grant types to cater to variety of applications and use-cases. Most widely used and secure grant type is 'Authorization Grant' which requires human interaction during the process of obtaining an Access and/or Refresh token.
Typically, there are two tokens that an OAuth Server can return. An 'Access Token' is a short lived token that enables access to the data. A 'Refresh Token' enables clients to request for a new 'Access Token' without any human interaction in order to continue to access data when an earlier access token gets expired.
Most of the Progress DataDirect drivers make it easy to obtain the initial Access and Refresh tokens via an intuitive User Interface. Once the Refresh token is obtained, the drivers are capable to discard the expired access token and request for a new access token from the OAuth Servers transparently to provide continuous access to data.
As an example, we use Progress DataDirect Sharepoint ODBC driver to demonstrate the capabilities around OAuth. There are two choices for the users to get through OAuth depending on the type of the client applications they wish to use.
We will learn about these, more in detail in the next section.
Applications that require access to data without any human intervention can pre-fetch the Access Token and Refresh Token once. With the refresh token in place, the driver would automatically obtain a new access token when an existing access token expires. This way, applications would have continuous access to data.
Pre-requisites
Download and Install Progress DataDirect Sharepoint ODBC Driver.
OAuth Client application needs to be setup on the source side.
Refer to the full documentation here.
Follow the steps mentioned below, to pre-fetch the tokens
In some use-cases, if you have a need to have the client applications dynamically perform the OAuth handshake via the underlying ODBC driver, Progress DataDirect Sharepoint ODBC driver make that a possibility.
In this case, we will see how the driver initiates OAuth handshake when the Microsoft Excel application is being used.
Follow the steps mentioned below, to perform a dynamic oauth handshake -
Depending on the level of security you care, this feature is particularly useful when the tokens are not saved as part of the DSN, but use the driver's ability to dynamically obtain required tokens and get access to data.