Options
All
  • Public
  • Public/Protected
  • All
Menu

@azure/identity

Package version

Index

Type aliases

IdentityPlugin

IdentityPlugin: (context: unknown) => void

The type of an Azure Identity plugin, a function accepting a plugin context.

Type declaration

    • (context: unknown): void
    • Parameters

      • context: unknown

      Returns void

Variables

Const VSCodeServiceName

VSCodeServiceName: "VS Code Azure" = "VS Code Azure"

Functions

Const vsCodePlugin

  • vsCodePlugin(context: any): void
  • A plugin that provides the dependencies of VisualStudioCodeCredential and enables it within @azure/identity. The plugin API is compatible with @azure/identity versions 2.0.0 and later. Load this plugin using the useIdentityPlugin function, imported from @azure/identity.

    VisualStudioCodeCredential uses the authentication session from the "Azure Account" extension in VS Code.

    To use this functionality, import VisualStudioCodeCredential or DefaultAzureCredential from @azure/identity. If this plugin is not enabled, then VisualStudioCodeCredential will throw a CredentialUnavailableError, and DefaultAzureCredential will not be able to use authentication through Visual Studio Code.

    Example:

    import { useIdentityPlugin, VisualStudioCodeCredential } from "@azure/identity";
    import { vsCodePlugin } from "@azure/identity-vscode";
    
    // Load the plugin
    useIdentityPlugin(vsCodePlugin);
    
    // Now that the plugin is loaded, this credential may be used
    const credential = new VisualStudioCodeCredential();

    Parameters

    • context: any

    Returns void

Generated using TypeDoc