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

@azure/core-auth

Package Overview
Dependencies
Maintainers
2
Versions
307
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azure/core-auth

Provides low-level interfaces and helper methods for authentication in Azure SDK

  • 1.7.3-alpha.20240426.4
  • npm
  • Socket score

Version published
Weekly downloads
2.1M
decreased by-55.22%
Maintainers
2
Weekly downloads
 
Created

What is @azure/core-auth?

The @azure/core-auth package provides a standard way to manage authentication and authorization across the Azure SDKs in JavaScript. It includes a set of interfaces and classes that can be used to implement authentication mechanisms such as token credentials, and to integrate with various Azure services that require authentication.

What are @azure/core-auth's main functionalities?

TokenCredential Interface

The TokenCredential interface is a core component that allows for the implementation of custom authentication mechanisms. When you implement this interface, you can use it with Azure SDKs that accept credential objects for authentication. The code sample demonstrates how to create a custom credential class that extends TokenCredential.

class MyCredential extends TokenCredential {
  async getToken(scopes, options) {
    // Your logic to acquire a token
    return { token: 'your_token', expiresOnTimestamp: 12345 };
  }
}

DefaultAzureCredential

DefaultAzureCredential is a class that provides a seamless authentication experience across Azure services. It tries multiple credentials in a specific order, attempting to find the best one that works for the current environment. This code sample shows how to instantiate DefaultAzureCredential, which can then be passed to other Azure SDK clients for authentication.

const { DefaultAzureCredential } = require('@azure/identity');
const credential = new DefaultAzureCredential();

Other packages similar to @azure/core-auth

Keywords

FAQs

Package last updated on 26 Apr 2024

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