Configuring Authentication

To access Magento data stores, you must authenticate the connection using a token-based authentication protocol. You can do this by providing a valid access token, or by providing your Magento credentials so that the connector retrieves and use the corresponding access token.

For more information about the authentication protocol that Magento supports, including information about how to find your access token, see "Token-based Authentication" in Getting Started With Web APIs: http://devdocs.magento.com/guides/v2.2/get-started/authentication/gs-authentication-token.html.

Using an Access Token

If you already have a valid access token, you can authenticate your connection by providing the token in the connection URL.

To authenticate using an access token:

  • Connect to the server using a connection URL written in the following format:
  • jdbc:magento://;Host=[Endpoint];Auth_Type=Access Token;Auth_AccessToken=[YourAccessToken]

    The variables are defined as follows:

  • [Endpoint] is the endpoint of the Magento server.
  • [YourAccessToken] is your access token.

For example:

jdbc:magento://;Host=192.168.222.110/magento3;Auth_Type=Access Token;Auth_AccessToken=kP9PcyQ7prK2LwUMZMpFQ4R+5VE

Using Magento Credentials

You can configure the connector to retrieve and use an access token based on your Magento credentials. To do this, provide your Magento user name and password in the connection URL.

To authenticate using Magento credentials:

  • Connect to the server using a connection URL written in the following format:
  • jdbc:magento://;Host=[Endpoint];Auth_Type=OAuth 2.0;Auth_Client_ID=[YourUserName];Auth_Client_Secret=[YourPassword];UseEncryptedEndpoints=0;

    The variables are defined as follows:

  • [Endpoint] is the endpoint of the Magento server.
  • [YourPassword] is password corresponding to your user name.
  • [YourUserName] is the user name that you use to access Magento.

For example:

jdbc:magento://;Host=192.168.222.110/magento3;Auth_Type=OAuth 2.0;Auth_Client_ID=jsmith;Auth_Client_Secret=simba123;UseEncryptedEndpoints=0;

The connector uses these settings to retrieve an access token and authenticate your connection to Magento.