JDBC Driver for Workday

Build 22.0.8479

カスタムクレデンシャル

Use a custom OAuth app to authenticate with a user account. The procedures below are specific to normal user accounts, they are not necessary for ISUs because ISUs do not require an interactive login. See OAuth 認証の使用 for more information.

Desktop Authentication with a Custom OAuth App

Set the following properties to authenticate with the credentials for a custom OAuth app.

  • Set UseWQL, Host, and Tenant as usual.
  • InitiateOAuth: Set this to GETANDREFRESH. Use InitiateOAuth to avoid repeating the OAuth exchange and manually setting the OAuthAccessToken.
  • OAuthClientId: Set this to the client Id assigned when registering the OAuth app.
  • OAuthClientSecret: Set this to the client secret assigned when registering the OAuth app.

When connecting, the 本製品 opens the OAuth endpoint in the default browser. Log in and grant permissions to the application. The 本製品 then completes the OAuth process:

  1. Extracts the access token from the callback URL and authenticates requests.
  2. Refreshes the access token when it expires.
  3. Saves OAuth values in OAuthSettingsLocation to be persisted across connections.

Web Authentication with a Custom OAuth App

When connecting via a Web application, register a custom OAuth app with Workday. Use the 本製品 to get and manage the OAuth token values.

Get an OAuth Access Token

Set the following connection properties to obtain the OAuthAccessToken:

  • Set UseWQL, Host, and Tenant as usual.
  • OAuthClientId: Set this to the Client Id in the OAuth app settings.
  • OAuthClientSecret: Set this to the Client Secret in the OAuth app settings.

Call stored procedures to complete the OAuth exchange:

  1. Call the GetOAuthAuthorizationURL stored procedure. Set the AuthMode input to WEB and set the CallbackURL input to the Redirect URI specified in the OAuth app settings. The stored procedure returns the URL to the OAuth endpoint.
  2. Log in and authorize the application. You are redirected back to the callback URL.
  3. Call the GetOAuthAccessToken stored procedure. Set the AuthMode input to WEB. Set the Verifier input to the "code" parameter in the query string of the callback URL.

Refresh the OAuth Access Token

Set InitiateOAuth to REFRESH to automatically refresh the OAuth access token when it expires, or call the RefreshOAuthAccessToken stored procedure to refresh the token manually.

Automatic Refresh

To refresh the token with InitiateOAuth, set the following on the first data connection:

  • Set UseWQL, Host, and Tenant as usual.
  • InitiateOAuth: Set this to REFRESH. Use InitiateOAuth to avoid repeating the OAuth exchange and manually setting the OAuthAccessToken.
  • OAuthClientId: Set this to the Client Id in the OAuth app settings.
  • OAuthClientSecret: Set this to the Client Secret in the OAuth app settings.
  • OAuthAccessToken: Set this to the access token returned by GetOAuthAccessToken.
  • OAuthRefreshToken: Set this to the refresh token returned by GetOAuthAccessToken.
  • OAuthSettingsLocation: Set this to the path where the 本製品 will save the OAuth values, to be persisted across connections.

On subsequent data connections, set the following:

  • UseWQL, Host and Tenant
  • InitiateOAuth
  • OAuthSettingsLocation

Manual Refresh

Use the RefreshOAuthAccessToken stored procedure to manually refresh the OAuthAccessToken. Call the stored procedure after the ExpiresIn parameter value returned by GetOAuthAccessToken has elapsed. It is necessary to set the following connection properties to be set:

  • UseWQL: Set this to true.
  • Set the UseWQL, Host, and Tenant as usual.
  • OAuthClientId: Set this to the Client Id in the OAuth app settings.
  • OAuthClientSecret: Set this to the Client Secret in the OAuth app settings.

Call RefreshOAuthAccessToken with the following parameter set:

Once the new tokens have been retrieved, open a new connection with the following properties set.

  • UseWQL: Set this to true.
  • Set the Host and Tenant as usual.
  • InitiateOAuth
  • OAuthAccessToken: Set this to the access token retured from the OAuthRefreshToken procedure.

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8479