UNPKG

@equinor/fusion-framework-module-msal-node

Version:

Fusion Framework module for secure Azure AD authentication in Node.js using MSAL. Supports interactive, silent, and token-only authentication modes with encrypted token storage.

25 lines (24 loc) 1.2 kB
import type { Module } from '@equinor/fusion-framework-module'; import { AuthConfigurator } from './AuthConfigurator.js'; import type { IAuthProvider } from './AuthProvider.interface.js'; /** * MSAL Node authentication module for the Fusion Framework. * * This module provides authentication capabilities for Node.js applications using Microsoft's MSAL library. * It supports multiple authentication modes: token-only, interactive (browser-based), and silent (cached credentials). * * The module exposes a unified provider interface for acquiring tokens and managing authentication state. * * - In `token_only` mode, a static access token is used (see {@link AuthTokenProvider}). * - In `interactive` mode, the user is prompted via a local server and browser (see {@link AuthProviderInteractive}). * - In all other cases, silent authentication is attempted using cached credentials (see {@link AuthProvider}). * * @see AuthProvider * @see AuthProviderInteractive * @see AuthTokenProvider * @see IAuthProvider * @see AuthConfigurator */ export type MsalNodeModule = Module<'auth', IAuthProvider, AuthConfigurator>; export declare const module: MsalNodeModule; export default module;