Options
All
  • Public
  • Public/Protected
  • All
Menu

Class VisualStudioCodeCredential

Package version

Connects to Azure using the credential provided by the VSCode extension 'Azure Account'. Once the user has logged in via the extension, this credential can share the same refresh token that is cached by the extension. Connects to Azure using the credential provided by the VSCode extension 'Azure Account'.

Hierarchy

  • VisualStudioCodeCredential

Implements

  • any
  • any

Index

Constructors

Methods

Constructors

constructor

  • Creates an instance of VisualStudioCodeCredential to use for automatically authenticating via VSCode.

    Note: VisualStudioCodeCredential is provided by a plugin package: @azure/identity-vscode. If this package is not installed and registered using the plugin API (useIdentityPlugin), then authentication using VisualStudioCodeCredential will not be available.

    Parameters

    Returns VisualStudioCodeCredential

Methods

getToken

  • getToken(scopes: string | string[], options?: GetTokenOptions): Promise<AccessToken>
  • Returns the token found by searching VSCode's authentication cache or returns null if no token could be found.

    Parameters

    • scopes: string | string[]

      The list of scopes for which the token will have access.

    • Optional options: GetTokenOptions

      The options used to configure any requests this TokenCredential implementation might make.

    Returns Promise<AccessToken>

Generated using TypeDoc