@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.29 kB
TypeScript
import type { IModuleConfigurator, IModulesConfigurator } from '@equinor/fusion-framework-module';
import { type MsalNodeModule } from './module.js';
/**
* Enables the MSAL Node module by registering its configuration with the provided modules configurator.
*
* This function should be called to add the MSAL Node authentication module to a Fusion Framework application.
* It accepts a configurator instance and a configuration function, which is used to define the module's behavior and settings.
*
* @param configurator - The modules configurator instance used to register the MSAL Node module.
* @param configure - A configuration function for customizing the module (e.g., setting client ID, tenant ID, mode).
*
* @see IAuthProvider for the authentication provider interface exposed by the module.
* @see IAuthConfigurator for the configuration builder interface used in the configure callback.
*
* @example
* ```typescript
* enableModule(configurator, (builder) => {
* builder.setMode('interactive');
* builder.setClientConfig('your-tenant-id', 'your-client-id');
* });
* ```
*/
export declare const enableModule: (configurator: IModulesConfigurator<any, any>, configure: IModuleConfigurator<MsalNodeModule>["configure"]) => void;
export default enableModule;