Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async function main(): Promise {
const tokenCreds = await interactiveLogin({
tokenAudience: "https://servicebus.azure.net/"
});
const sbClient = ServiceBusClient.createFromAadTokenCredentials(serviceBusEndpoint, tokenCreds);
/*
Refer to other samples, and place your code here
to create queue clients, and send/receive messages
*/
await sbClient.close();
}
async function main(): Promise {
const tokenCreds = await loginWithServicePrincipalSecret(clientId, clientSecret, tenantId, {
tokenAudience: "https://servicebus.azure.net/"
});
const sbClient = ServiceBusClient.createFromAadTokenCredentials(serviceBusEndpoint, tokenCreds);
/*
Refer to other samples, and place your code here
to create queue clients, and send/receive messages
*/
await sbClient.close();
}
async function main() {
const tokenCreds = await loginWithUsernamePassword(username, password, {
tokenAudience: "https://servicebus.azure.net/"
});
const sbClient = ServiceBusClient.createFromAadTokenCredentials(serviceBusEndpoint, tokenCreds);
/*
Refer to other samples, and place your code here
to create queue clients, and to send/receive messages
*/
await sbClient.close();
}
async function main() {
const tokenCreds = await interactiveLogin({
tokenAudience: "https://servicebus.azure.net/"
});
const sbClient = ServiceBusClient.createFromAadTokenCredentials(serviceBusEndpoint, tokenCreds);
/*
Refer to other samples, and place your code here
to create queue clients, and send/receive messages
*/
await sbClient.close();
}
async function main(): Promise {
const tokenCreds = await loginWithUsernamePassword(username, password, {
tokenAudience: "https://servicebus.azure.net/"
});
const sbClient = ServiceBusClient.createFromAadTokenCredentials(serviceBusEndpoint, tokenCreds);
/*
Refer to other samples, and place your code here
to create queue clients, and to send/receive messages
*/
await sbClient.close();
}
async function main() {
const tokenCreds = await loginWithServicePrincipalSecret(clientId, clientSecret, tenantId, {
tokenAudience: "https://servicebus.azure.net/"
});
const sbClient = ServiceBusClient.createFromAadTokenCredentials(serviceBusEndpoint, tokenCreds);
/*
Refer to other samples, and place your code here
to create queue clients, and send/receive messages
*/
await sbClient.close();
}