/** * @fractary/core - Authentication Module * * Provides token providers and utilities for GitHub authentication. * Supports both Personal Access Token (PAT) and GitHub App authentication. */ export type { TokenProvider, GitHubAppConfig, GitHubConfig } from './types'; export { StaticTokenProvider } from './static-token-provider'; export { GitHubAppAuth } from './github-app-auth'; export { GitHubAppTokenProvider } from './github-app-token-provider'; import type { TokenProvider, GitHubConfig } from './types'; /** * Create a token provider from GitHub configuration * * Priority order: * 1. If config.app has id + installation_id → GitHubAppTokenProvider * 2. If GITHUB_TOKEN env var or config.token → StaticTokenProvider * 3. Otherwise throws AuthenticationError * * @param config GitHub configuration object * @returns TokenProvider instance * @throws AuthenticationError if no valid authentication method is found * * @example * ```typescript * // GitHub App authentication * const provider = createTokenProvider({ * app: { * id: '123456', * installation_id: '789012', * private_key_path: '/path/to/key.pem' * } * }); * * // PAT authentication * const provider = createTokenProvider({ * token: 'ghp_xxxx' * }); * * // Environment variable (GITHUB_TOKEN) * const provider = createTokenProvider({}); * ``` */ export declare function createTokenProvider(config?: GitHubConfig): TokenProvider; //# sourceMappingURL=index.d.ts.map