mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
[Azure-Kusto-Node] Add UserCodeInfo to withAadDeviceAuthentication method (#39312)
* Add UserCodeInfo * Added package.json * Added node reference
This commit is contained in:
committed by
Wesley Wigham
parent
86ffa58e94
commit
2a33e79ece
@@ -16,8 +16,8 @@ KustoConnectionStringBuilder.withAadManagedIdentities(connectionString, 'msi_end
|
||||
KustoConnectionStringBuilder.withAadUserPasswordAuthentication(connectionString, 'username', 'password');
|
||||
KustoConnectionStringBuilder.withAadUserPasswordAuthentication(connectionString, 'username', 'password', 'authorityId');
|
||||
KustoConnectionStringBuilder.withAadDeviceAuthentication(connectionString, 'authId');
|
||||
KustoConnectionStringBuilder.withAadDeviceAuthentication(connectionString, 'authId', (tokenResponse: any) => {
|
||||
console.log(`Open ${tokenResponse.verificationUrl} and use ${tokenResponse.userCode } code to authorize.`);
|
||||
KustoConnectionStringBuilder.withAadDeviceAuthentication(connectionString, 'authId', tokenResponse => {
|
||||
console.log(`Open ${tokenResponse.verificationUrl} and use ${tokenResponse.userCode} code to authorize.`);
|
||||
});
|
||||
|
||||
const client2 = new Client("http://cluster.region.kusto.windows.net");
|
||||
|
||||
5
types/azure-kusto-data/index.d.ts
vendored
5
types/azure-kusto-data/index.d.ts
vendored
@@ -4,6 +4,9 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.1
|
||||
|
||||
/// <reference types="node" />
|
||||
import { UserCodeInfo } from "adal-node";
|
||||
|
||||
export class Client {
|
||||
constructor(kcsb: string | KustoConnectionStringBuilder);
|
||||
connectionString: KustoConnectionStringBuilder;
|
||||
@@ -40,7 +43,7 @@ export class KustoConnectionStringBuilder {
|
||||
authorityId: string;
|
||||
static withAadApplicationCertificateAuthentication(connectionString: string, aadAppId: string, certificate: string, thumbprint: string, authorityId: string): KustoConnectionStringBuilder;
|
||||
static withAadApplicationKeyAuthentication(connectionString: string, aadAppId: string, appKey: string, authorityId: string): KustoConnectionStringBuilder;
|
||||
static withAadDeviceAuthentication(connectionString: string, authorityId: string, authCallback?: any): KustoConnectionStringBuilder;
|
||||
static withAadDeviceAuthentication(connectionString: string, authorityId: string, authCallback?: (tokenReponse: UserCodeInfo) => void): KustoConnectionStringBuilder;
|
||||
static withAadUserPasswordAuthentication(connectionString: string, userId: string, password: string, authorityId?: any): KustoConnectionStringBuilder;
|
||||
static withAadManagedIdentities(connectionString: string, msiEndpoint?: string, clientId?: string): KustoConnectionStringBuilder;
|
||||
}
|
||||
|
||||
6
types/azure-kusto-data/package.json
Normal file
6
types/azure-kusto-data/package.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"adal-node": "^0.1.28"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user