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

Functions

Const cachePersistenceExtension

  • cachePersistenceExtension(context: any): void
  • An extension that provides persistent token caching for @azure/identity credentials. 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.

    In order to enable this functionality, you must also pass tokenCachePersistenceOptions to your credential constructors with an enabled property set to true.

    Example:

    import { useIdentityExtension, DeviceCodeCredential } from "@azure/identity";
    import { cachePersistenceExtension } from "@azure/identity-cache-persistence";
    
    // Load the extension
    useIdentityExtension(cachePersistenceExtension);
    
    const credential = new DeviceCodeCredential({
      tokenCachePersistenceOptions: {
        enabled: true
      }
    });

    Parameters

    • context: any

    Returns void

createPersistenceCachePlugin

  • createPersistenceCachePlugin(options?: MsalPersistenceOptions): Promise<CachePlugin>

Generated using TypeDoc