Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@azure/ms-rest-nodeauth

Package Overview
Dependencies
Maintainers
4
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azure/ms-rest-nodeauth

Azure Authentication library in node.js with type definitions.

  • 3.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created

What is @azure/ms-rest-nodeauth?

@azure/ms-rest-nodeauth is an npm package that provides various authentication mechanisms for Azure services in Node.js applications. It supports different types of credentials such as service principal, managed identity, and interactive login, making it easier to authenticate and interact with Azure resources.

What are @azure/ms-rest-nodeauth's main functionalities?

Service Principal Authentication

This feature allows you to authenticate using a service principal, which is a non-interactive way to authenticate with Azure. You need to provide the client ID, secret, and tenant ID (domain) of the service principal.

const msRestNodeAuth = require('@azure/ms-rest-nodeauth');

msRestNodeAuth.loginWithServicePrincipalSecret(clientId, secret, domain).then((credentials) => {
  // Use the credentials to interact with Azure services
  console.log('Authenticated with service principal');
}).catch((err) => {
  console.error('Error authenticating with service principal:', err);
});

Managed Identity Authentication

This feature allows you to authenticate using a managed identity, which is useful for applications running on Azure services like Azure VMs or Azure App Service. It eliminates the need to manage credentials.

const msRestNodeAuth = require('@azure/ms-rest-nodeauth');

msRestNodeAuth.loginWithManagedIdentity().then((credentials) => {
  // Use the credentials to interact with Azure services
  console.log('Authenticated with managed identity');
}).catch((err) => {
  console.error('Error authenticating with managed identity:', err);
});

Interactive Login

This feature allows you to authenticate interactively, which is useful for development and testing purposes. It opens a browser window for the user to log in and grant access.

const msRestNodeAuth = require('@azure/ms-rest-nodeauth');

msRestNodeAuth.interactiveLogin().then((credentials) => {
  // Use the credentials to interact with Azure services
  console.log('Authenticated with interactive login');
}).catch((err) => {
  console.error('Error authenticating with interactive login:', err);
});

Other packages similar to @azure/ms-rest-nodeauth

Keywords

FAQs

Package last updated on 15 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc