Socket
Socket
Sign inDemoInstall

@azure/core-auth

Package Overview
Dependencies
4
Maintainers
1
Versions
229
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azure/core-auth


Version published
Maintainers
1
Created

Package description

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

Readme

Source

Azure Core Authentication

This library provides core interfaces and helper methods for authenticating with Azure Active Directory. As a "core" library, it shouldn't need to be added as a dependency to any user code, only other Azure SDK libraries.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

If you'd like to contribute to this library, please read the contributing guide to learn more about how to build and test the code.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Impressions

Keywords

FAQs

Last updated on 11 Dec 2019

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc