/** * Configuration for OAuth client credentials flow */ export interface OAuthConfig { /** The URL to request the OAuth token from */ authUrl: string; /** The client ID for OAuth authentication */ clientId: string; /** The client secret for OAuth authentication */ clientSecret: string; /** The scope for the OAuth token. Use empty string if no scope is needed. */ scope: string; } /** * Standard OAuth 2.0 token response format as defined in RFC 6749 */ export interface OAuthTokenResponse { /** The access token issued by the authorization server */ access_token: string; /** The type of token issued (typically "Bearer") */ token_type: string; /** The lifetime in seconds of the access token */ expires_in: number; /** The refresh token, which can be used to obtain new access tokens (optional) */ refresh_token?: string; /** The scope of the access token (optional) */ scope?: string; } /** * A utility class for handling OAuth client credentials flow. * This is specifically for the client credentials grant type, * which is used for server-to-server authentication. */ export declare class OAuthClient { private config; constructor(config: OAuthConfig); /** * Requests an OAuth token using the client credentials flow. * The request is sent as application/x-www-form-urlencoded. * @returns A promise that resolves to the token response containing access_token and expires_in * @throws Error if the token request fails */ getToken(): Promise; } //# sourceMappingURL=oauth-client.d.ts.map