To configure the driver to use basic authentication:
  • Set the ServerName property to specify the base URL of the Aha! service to which you want to issue requests. For example, company.aha.io.
  • Set the AuthenticationMethod property to Basic (the default).
  • Set the User property to specify your logon ID.
  • Set the Password property to specify your password.
  • Optionally, specify values for any additional properties you want to configure.

The following examples demonstrate a session using a REST file with basic authentication enabled and AuthHeader set to the default.

For a connection URL:

Connection conn = DriverManager.getConnection
("jdbc:datadirect:aha://company.aha.io;user=jsmith@company.com;password=secret;");

For a data source:

AutoRESTDataSource mds = new AhaDataSource();
mds.setDescription("My Aha Data Source");
mds.setServerName("company.aha.io");