in data/src/main/java/com/microsoft/azure/kusto/data/auth/ConnectionStringBuilder.java [465:493]
public static ConnectionStringBuilder createWithAadApplicationCertificate(String clusterUrl,
String applicationClientId,
X509Certificate x509Certificate,
PrivateKey privateKey,
String authorityId) {
if (StringUtils.isEmpty(clusterUrl)) {
throw new IllegalArgumentException("clusterUrl cannot be null or empty");
}
if (StringUtils.isEmpty(applicationClientId)) {
throw new IllegalArgumentException("applicationClientId cannot be null or empty");
}
if (x509Certificate == null) {
throw new IllegalArgumentException("certificate cannot be null");
}
if (privateKey == null) {
throw new IllegalArgumentException("privateKey cannot be null");
}
ConnectionStringBuilder csb = new ConnectionStringBuilder();
csb.aadFederatedSecurity = true;
csb.clusterUrl = clusterUrl;
csb.applicationClientId = applicationClientId;
csb.useCertificateAuth = true;
csb.sendX509 = false;
csb.x509Certificate = x509Certificate;
csb.privateKey = privateKey;
csb.aadAuthorityId = authorityId;
return csb;
}