UNPKG

pagamio-frontend-commons-lib

Version:

Pagamio library for Frontend reusable components like the form engine and table container

27 lines (26 loc) 1.07 kB
/** * @fileoverview Defines interfaces for authentication processors * Provides type definitions for the authenticator factory pattern */ import type { AuthResponse, CustomAuthConfig } from '../types'; /** * Interface for authentication processor * Defines the contract that all authentication processors must implement */ export interface AuthenticatorProcessor<T extends CustomAuthConfig> { /** * Process login credentials and authenticate with the appropriate service * @param credentials - User login credentials * @param rememberMe - Whether to remember the user session * @param login - The login function from auth context * @returns Promise resolving to authentication response */ processLogin(credentials: Record<string, unknown>, rememberMe: boolean, login: (credentials: T['Credentials'], rememberMe: boolean) => Promise<AuthResponse<T>>): Promise<AuthResponse<T>>; } /** * Types of authenticators supported by the system */ export declare enum AuthenticatorType { DEFAULT = "default", STRAPI = "strapi" }