@pagamio/frontend-commons-lib
Version:
Pagamio library for Frontend reusable components like the form engine and table container
26 lines (25 loc) • 1.09 kB
TypeScript
/**
* @fileoverview Factory for creating authenticator processors
* Provides a central registry for different authentication processors
*/
import type { CustomAuthConfig } from '../types';
import { type AuthenticatorProcessor, AuthenticatorType } from './types';
/**
* Factory class for creating authenticator processors
* Maintains a registry of processor implementations and creates instances on demand
*/
export declare class AuthenticatorFactory {
private static processors;
/**
* Gets an authenticator processor by type
* @param type - The type of authenticator to get
* @returns An authenticator processor instance
*/
static getProcessor<T extends CustomAuthConfig>(type?: AuthenticatorType | string): AuthenticatorProcessor<T>;
/**
* Registers a new authenticator processor
* @param type - The type identifier for this processor
* @param processorClass - The processor class constructor
*/
static registerProcessor(type: string, processorClass: new <T extends CustomAuthConfig>() => AuthenticatorProcessor<T>): void;
}