ART Framework API Docs
    Preparing search index...

    Class AuthManager

    Central authentication manager for handling multiple authentication strategies. Manages registration and retrieval of different auth strategies for secure connections to remote services like MCP servers and A2A agents.

    Index

    Constructors

    Methods

    • Retrieves authentication headers from the specified strategy.

      Parameters

      • strategyId: string

        The ID of the registered strategy to use

      Returns Promise<Record<string, string>>

      Promise resolving to authentication headers

      If strategy is not found or authentication fails

    • Handles the redirect from an OAuth provider.

      Parameters

      • strategyId: string

        The ID of the strategy that initiated the redirect.

      Returns Promise<void>

      A promise that resolves when the redirect has been handled.

      If the strategy is not found or does not support handling redirects.

    • Checks if a strategy with the given ID is registered.

      Parameters

      • strategyId: string

        The ID to check

      Returns boolean

      True if the strategy exists, false otherwise

    • Checks if the user is authenticated with a specific strategy.

      Parameters

      • strategyId: string

        The ID of the strategy to check.

      Returns Promise<boolean>

      A promise that resolves to true if authenticated, false otherwise.

    • Initiates the login flow for a specific strategy.

      Parameters

      • strategyId: string

        The ID of the strategy to use for login.

      Returns Promise<void>

      A promise that resolves when the login process is initiated.

      If the strategy is not found or does not support login.

    • Logs the user out of a specific strategy.

      Parameters

      • strategyId: string

        The ID of the strategy to use for logout.

      Returns void

      If the strategy is not found or does not support logout.

    • Registers an authentication strategy with the given ID.

      Parameters

      • strategyId: string

        Unique identifier for the strategy (e.g., 'default_zyntopia_auth', 'api_key_strategy')

      • strategy: IAuthStrategy

        Implementation of IAuthStrategy

      Returns void

      If strategyId is empty or null

    • Removes a registered strategy.

      Parameters

      • strategyId: string

        The ID of the strategy to remove

      Returns boolean

      True if strategy was removed, false if it didn't exist