import { AxiosInstance } from 'axios'; import { StoredToken, PasswordLimitedGrantConfig } from '../types'; import { TokenManager } from './token-manager'; /** * PasswordLimitedGrantAuth handles authentication using the password_limited grant. * This grant is suitable for headless/server-side clients with registered users. * * See: https://oauth.iracing.com/oauth2/book/token_endpoint.html#password-limited-grant */ export declare class PasswordLimitedGrantAuth { private config; private tokenManager; private httpClient; private tokenKey; constructor(config: PasswordLimitedGrantConfig, tokenManager: TokenManager, httpClient?: AxiosInstance); /** * Get a valid access token, authenticating if necessary * @returns Access token string * @throws AuthError if authentication fails */ getAccessToken(): Promise; /** * Authenticate using username and password * @returns Access token string * @throws AuthError if authentication fails */ authenticate(): Promise; /** * Refresh an access token using a refresh token * @param refreshToken - The refresh token to use * @returns New access token string * @throws AuthError if refresh fails */ refreshToken(refreshToken: string): Promise; /** * Get the current stored token * @returns StoredToken or undefined */ getStoredToken(): StoredToken | undefined; /** * Manually clear the stored token */ clearToken(): void; /** * Handle token response and store it */ private handleTokenResponse; /** * Handle errors from authentication requests */ private handleError; } //# sourceMappingURL=password-limited-grant.d.ts.map