Basic authentication
- Last Updated: May 13, 2025
- 1 minute read
- DataDirect Connectors
- JDBC
- GitHub 6.0
- Documentation
To configure the driver to use basic authentication.
- Set the AuthenticationMethod property to
Basic. - Set the ServerName property to specify the URL of the GitHub service to which you want to issue requests. For example, github.enterprise.com for enterprise accounts and api.github.com for cloud accounts.
- Set the User property to specify the user name that is used to connect to the GitHub service. For example, jsmith.
- Set the Password property to specify the password used to connect to the GitHub service.
The following examples show the connection information required to establish a connection using the basic authentication.
Connection URL
Connection conn = DriverManager.getConnection
("jdbc:datadirect:github:AuthenticationMethod=Basic;
ServerName=github.enterprise.com;DefaultQueryOptions=
(OrgName=xyz;UserName=abc;RepoName=RN1;ProjectId=123;ColumnId=CID1;);
User=jsmith;Password=secret;");
Data
Source
GitHubDataSource mds = new GitHubDataSource();
mds.setDescription("My GitHub Data Source");
mds.setAuthenticationMethod("Basic");
mds.setServerName("github.enterprise.com");
mds.setUser("jsmith");
mds.setPassword("secret");Note: The DefaultQueryOption
connection property is optional.