Options
All
  • Public
  • Public/Protected
  • All
Menu

@azure/keyvault-secrets

Package version

Index

Type aliases

ParsedWWWAuthenticate

ParsedWWWAuthenticate: {}
internal

Holds the known WWWAuthenticate keys and their values as a result of parsing a WWW-Authenticate header.

Type declaration

ValidParsedWWWAuthenticateProperties

ValidParsedWWWAuthenticateProperties: typeof validParsedWWWAuthenticateProperties[number]
internal

A union type representing all valid key names in WWW-Authenticate header.

Variables

Const LATEST_API_VERSION

LATEST_API_VERSION: "7.3-preview" = "7.3-preview"

The latest supported KeyVault service API version

Const SDK_VERSION

SDK_VERSION: string = "4.4.0-beta.2"

Const logger

logger: any = createClientLogger("keyvault-secrets")

The @azure/logger configuration for this package.

Const validParsedWWWAuthenticateProperties

validParsedWWWAuthenticateProperties: ["authorization", "authorization_url", "resource", "scope", "tenantId"] = ["authorization","authorization_url","resource","scope","tenantId"] as const
internal

Valid key names in WWW-Authenticate header.

Const withTrace

withTrace: TracedFunction = createTraceFunction("Azure.KeyVault.Secrets.SecretClient")
internal
internal

Functions

challengeBasedAuthenticationPolicy

  • challengeBasedAuthenticationPolicy(credential: TokenCredential): RequestPolicyFactory

createTraceFunction

  • Returns a function that can be used for tracing options.

    example

    const withTrace = createTraceFunction("Azure.KeyVault.Certificates.CertificateClient")

    internal

    Parameters

    • prefix: string

      The prefix to use, likely the name of the class / client.

    Returns TracedFunction

getSecretFromSecretBundle

  • getSecretFromSecretBundle(bundle: SecretBundle | DeletedSecretBundle): KeyVaultSecret

parseKeyVaultSecretIdentifier

  • Parses the given Key Vault Secret Id. An example is:

    https://.vault.azure.net/secrets//

    On parsing the above Id, this function returns:

      {
         sourceId: "https://<keyvault-name>.vault.azure.net/secrets/<secret-name>/<unique-version-id>",
         vaultUrl: "https://<keyvault-name>.vault.azure.net",
         version: "<unique-version-id>",
         name: "<secret-name>"
      }

    Parameters

    • id: string

      The Id of the Key Vault Secret.

    Returns KeyVaultSecretIdentifier

parseKeyvaultIdentifier

parseWWWAuthenticate

  • Parses an WWW-Authenticate response. This transforms a string value like: Bearer authorization="https://some.url/tenantId", resource="https://some.url" into an object like: { authorization: "https://some.url/tenantId", resource: "https://some.url" }

    Parameters

    • wwwAuthenticate: string

      String value in the WWW-Authenticate header

    Returns ParsedWWWAuthenticate

Generated using TypeDoc