Options
All
  • Public
  • Public/Protected
  • All
Menu

@azure/identity

Package version

Index

Type aliases

IdentityExtension

IdentityExtension: (context: unknown) => void

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

Type declaration

    • (context: unknown): void
    • Parameters

      • context: unknown

      Returns void

Variables

Const VSCodeServiceName

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

Functions

Const vsCodeExtension

  • vsCodeExtension(context: any): void
  • An extension that provides the dependencies of VisualStudioCodeCredential and enables it within @azure/identity. The extension API is compatible with @azure/identity versions 2.0.0 and later. Load this extension using the useIdentityExtension 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 extension is not enabled, then VisualStudioCodeCredential will throw a CredentialUnavailableError, and DefaultAzureCredential will not be able to use authentication through Visual Studio Code.

    Example:

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

    Parameters

    • context: any

    Returns void

Generated using TypeDoc