Documentation
    Preparing search index...

    Global authentication manager handling registration and retrieval of diverse Auth providers (adapters) via an alias registry.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _providers: AuthRegistry<any> = {}
    classRegistry: { [key: string]: any } = {}

    Dictionary holding registered active Quatrain models/components.

    defaultProvider: string = 'default'

    The fallback provider alias.

    ERROR_EMAIL_EXISTS: string = ...

    Standardized error message for duplicate email constraint violations.

    ERROR_WEAK_PASSWORD: string = ...

    Standardized error message for weak password / password complexity violations.

    logger: any = ...

    Core logger dedicated to Auth actions.

    logLevel: DEBUG = LogLevel.DEBUG

    System-wide base log verbosity.

    me: string = ...

    Identifying namespace for this core component.

    storage: typeof NodePersist = persist

    Persistent key-value storage engine reference.

    storagePrefix: "core" = 'core'

    Context prefix string for scoped storage keys.

    Accessors

    • get userClass(): any

      Returns any

    • set userClass(cls: any): void

      Parameters

      • cls: any

      Returns void

    Methods

    • Maps a specific entity class to an active name so the factory reflection can locate it.

      Parameters

      • name: string

        Semantic registry name.

      • obj: any

        Class constructor.

      Returns void

    • Stores a primitive value durably in the core storage instance.

      Parameters

      • key: string

        Identification string.

      • value: any

        Value.

      Returns Promise<void>

    • Injects a new logger block under a specific namespace alias.

      Parameters

      • alias: string = ...

        The logging context name.

      Returns any

      Instantiated LoggerAdapter.

    • Registers a configured auth provider into the global context.

      Parameters

      • provider: AbstractAuthAdapter

        Instantiated auth adapter.

      • alias: string

        Short identifier name.

      • setDefault: boolean = false

        If true, marks this adapter as the fallback provider.

      Returns void

    • Triggers a debug log on the core logger.

      Parameters

      • ...message: any

        Content to log.

      Returns void

    • Deprecated: Reserved schema definition hook.

      Parameters

      • key: string

        The property block to generate.

      Returns { manifest: { mandatory: boolean; type: StringConstructor } }

      Field definitions block.

    • Triggers an error log on the core logger.

      Parameters

      • ...message: any

        Content to log.

      Returns void

    • Returns an injected class constructor by its registry identifier.

      Parameters

      • name: string

        The semantic name to resolve.

      Returns any

      Class definition.

    • Recovers a durably persisted value from the storage layer.

      Parameters

      • key: string

        The target identifier.

      Returns Promise<any>

      The recovered value.

    • Fetches a registered provider by its alias.

      Type Parameters

      Parameters

      • alias: string = ...

        Requested provider identifier. Defaults to defaultProvider.

      Returns T

      The corresponding auth adapter.

      If the specified alias is unknown.

    • Utility lookup to find executable paths in the system using which.

      Parameters

      • command: string

        The executable.

      Returns Promise<string>

      The resolved system path.

    • Triggers an info log on the core logger.

      Parameters

      • ...message: any

        Content to log.

      Returns void

    • Triggers a standard log on the core logger.

      Parameters

      • ...message: any

        Content to log.

      Returns void

    • Scans all registered auth providers, collects their endpoint handlers, and registers them dynamically under a common routing root path.

      Parameters

      • server: any

        The Quatrain ServerAdapter (Astro, Express, etc.).

      • rootPath: string = '/api/auth'

        The common authentication root segment (defaults to '/api/auth').

      Returns void

    • Mutates the underlying verbosity constraints.

      Parameters

      Returns void

    • Execution suspension utility blocking the event loop context.

      Parameters

      • seconds: number = 1

        Duration count.

      Returns Promise<unknown>

      The promise to await.

    • Returns an ISO string representing the current time.

      Returns string

    • Triggers a trace log on the core logger.

      Parameters

      • ...message: any

        Content to log.

      Returns void

    • Triggers a warning log on the core logger.

      Parameters

      • ...message: any

        Content to log.

      Returns void