UNPKG

adk-typescript

Version:

TypeScript port of Google's Agent Development Kit (ADK)

71 lines (70 loc) 1.6 kB
/** * Base interface for authentication credentials */ export interface AuthCredential { /** * The type of credentials */ type: string; /** * Get the credential value * @returns The credential value */ getValue(): any; } /** * API key credential implementation */ export declare class ApiKeyCredential implements AuthCredential { type: string; private apiKey; /** * Initialize the API key credential * @param apiKey The API key value */ constructor(apiKey: string); /** * Get the API key value * @returns The API key */ getValue(): string; } /** * Bearer token credential implementation */ export declare class BearerCredential implements AuthCredential { type: string; private token; /** * Initialize the bearer token credential * @param token The bearer token value */ constructor(token: string); /** * Get the bearer token value * @returns The bearer token */ getValue(): string; } /** * Basic auth credential implementation */ export declare class BasicCredential implements AuthCredential { type: string; private username; private password; /** * Initialize the basic auth credential * @param username The username * @param password The password */ constructor(username: string, password: string); /** * Get the basic auth credentials * @returns An object containing the username and password */ getValue(): { username: string; password: string; }; }