import { HttpRequest } from '../types'; import { IAuthProvider, AuthContext } from './IAuthProvider'; export declare class OAuth2Provider implements IAuthProvider { readonly name = "oauth2"; /** Token cache keyed by cache key (tokenUrl + clientId + grantType) */ private tokenCache; /** Buffer time before token expiry to refresh (in milliseconds) */ private readonly expiryBufferMs; canHandle(request: HttpRequest): boolean; applyAuth(request: HttpRequest, context: AuthContext): Promise; /** * Clear the token cache */ clearTokenCache(): void; /** * Check if cached token is still valid */ private isTokenValid; /** * Generate cache key from auth config */ private generateCacheKey; /** * Fetch token from authorization server */ private fetchToken; /** * Add client_credentials grant parameters */ private addClientCredentialsParams; /** * Add password grant parameters */ private addPasswordParams; /** * Add refresh_token grant parameters */ private addRefreshTokenParams; /** * Replace variable placeholders with actual values */ private replaceVariables; }