Socket
Socket
Sign inDemoInstall

@azure-tools/test-credential

Package Overview
Dependencies
41
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @azure-tools/test-credential

Test utilities library that provides the test credential


Version published
Maintainers
2
Install size
15.4 MB
Created

Readme

Source

Azure Tools - Test Credential

Note: This project is a test utility that assits with testing the packages maintained at the Azure SDK for JavaScript repository. This is not intended for the public utilization.

This library provides a TokenCredential implementation for testing Azure SDK packages. This library is supposed to be utilized along with the @azure-tools/test-recorder library for testing Azure SDKs.

Getting started

Installation

Add this library as a dev dependency in your project.

rush add -p @azure-tools/test-credential --dev

Key concepts

Usage

import { createTestCredential } from "@azure-tools/test-credential";

const credential = createTestCredential();

This library provides the credential to be used in the tests

In playback mode

  • returns a NoOpCredential (does not make a request to AAD and produces a fake access_token)

In record/live modes

  • returns a ClientSecretCredential from @azure/identity (expects AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET in your environment or in the .env file)
  • AAD traffic won't be recorded if this credential is used.

Next steps

Try out this package in your application and provide feedback!

Troubleshooting

Log an issue at https://github.com/Azure/azure-sdk-for-js/issues

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.

Impressions

Keywords

FAQs

Last updated on 10 Apr 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc