UNPKG

1.14 kBTypeScriptView Raw
1import { GaxiosOptions } from 'gaxios';
2import { AuthClient } from './authclient';
3import { GetAccessTokenResponse, Headers } from './oauth2client';
4/**
5 * An AuthClient without any Authentication information. Useful for:
6 * - Anonymous access
7 * - Local Emulators
8 * - Testing Environments
9 *
10 */
11export declare class PassThroughClient extends AuthClient {
12 /**
13 * Creates a request without any authentication headers or checks.
14 *
15 * @remarks
16 *
17 * In testing environments it may be useful to change the provided
18 * {@link AuthClient.transporter} for any desired request overrides/handling.
19 *
20 * @param opts
21 * @returns The response of the request.
22 */
23 request<T>(opts: GaxiosOptions): Promise<import("gaxios").GaxiosResponse<T>>;
24 /**
25 * A required method of the base class.
26 * Always will return an empty object.
27 *
28 * @returns {}
29 */
30 getAccessToken(): Promise<GetAccessTokenResponse>;
31 /**
32 * A required method of the base class.
33 * Always will return an empty object.
34 *
35 * @returns {}
36 */
37 getRequestHeaders(): Promise<Headers>;
38}