npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@azure/core-auth

v1.11.0

Published

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

Downloads

67,274,750

Readme

Azure Core Authentication client library for JavaScript

The @azure/core-auth package provides core interfaces and helper methods for authenticating with Azure services using Azure Active Directory and other authentication schemes common across the Azure SDK. As a "core" library, it shouldn't need to be added as a dependency to any user code, only other Azure SDK libraries.

Getting started

Installation

Install this library using npm as follows

npm install @azure/core-auth

Key Concepts

The TokenCredential interface represents a credential capable of providing an authentication token. The @azure/identity package contains various credentials that implement the TokenCredential interface.

The AzureKeyCredential is a static key-based credential that supports key rotation via the update method. Use this when a single secret value is needed for authentication, e.g. when using a shared access key.

The AzureNamedKeyCredential is a static name/key-based credential that supports name and key rotation via the update method. Use this when both a secret value and a label are needed, e.g. when using a shared access key and shared access key name.

The AzureSASCredential is a static signature-based credential that supports updating the signature value via the update method. Use this when using a shared access signature.

Examples

AzureKeyCredential

import { AzureKeyCredential } from "@azure/core-auth";

const credential = new AzureKeyCredential("secret value");

console.log(credential.key); // prints: "secret value"

credential.update("other secret value");

console.log(credential.key); // prints: "other secret value"

AzureNamedKeyCredential

import { AzureNamedKeyCredential } from "@azure/core-auth";

const credential = new AzureNamedKeyCredential("ManagedPolicy", "secret value");

console.log(`${credential.name}, ${credential.key}`); // prints: "ManagedPolicy, secret value"

credential.update("OtherManagedPolicy", "other secret value");

console.log(`${credential.name}, ${credential.key}`); // prints: "OtherManagedPolicy, other secret value"

AzureSASCredential

import { AzureSASCredential } from "@azure/core-auth";

const credential = new AzureSASCredential("signature1");

console.log(credential.signature); // prints: "signature1"

credential.update("signature2");

console.log(credential.signature); // prints: "signature2"

Next steps

You can build and run the tests locally by executing npm run test. Explore the test folder to see advanced usage and behavior of the public classes.

Troubleshooting

If you run into issues while using this library, please feel free to file an issue.

Contributing

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.