diff --git a/src/auth/authclient.ts b/src/auth/authclient.ts index 3e443334..f41a1537 100644 --- a/src/auth/authclient.ts +++ b/src/auth/authclient.ts @@ -15,7 +15,7 @@ import {EventEmitter} from 'events'; import {GaxiosOptions, GaxiosPromise, GaxiosResponse} from 'gaxios'; -import {DefaultTransporter} from '../transporters'; +import {DefaultTransporter, Transporter} from '../transporters'; import {Credentials} from './credentials'; import {Headers} from './oauth2client'; @@ -93,7 +93,7 @@ export abstract class AuthClient * See {@link https://cloud.google.com/docs/quota| Working with quotas} */ quotaProjectId?: string; - transporter = new DefaultTransporter(); + transporter: Transporter = new DefaultTransporter(); credentials: Credentials = {}; projectId?: string | null; eagerRefreshThresholdMillis = 5 * 60 * 1000; diff --git a/src/auth/externalAccountAuthorizedUserClient.ts b/src/auth/externalAccountAuthorizedUserClient.ts index c0c081cd..ca267bda 100644 --- a/src/auth/externalAccountAuthorizedUserClient.ts +++ b/src/auth/externalAccountAuthorizedUserClient.ts @@ -20,7 +20,7 @@ import { OAuthClientAuthHandler, OAuthErrorResponse, } from './oauth2common'; -import {BodyResponseCallback, DefaultTransporter} from '../transporters'; +import {BodyResponseCallback, Transporter} from '../transporters'; import { GaxiosError, GaxiosOptions, @@ -83,7 +83,7 @@ class ExternalAccountAuthorizedUserHandler extends OAuthClientAuthHandler { */ constructor( private readonly url: string, - private readonly transporter: DefaultTransporter, + private readonly transporter: Transporter, clientAuthentication?: ClientAuthentication ) { super(clientAuthentication); diff --git a/src/auth/stscredentials.ts b/src/auth/stscredentials.ts index 52178b82..19ec95bd 100644 --- a/src/auth/stscredentials.ts +++ b/src/auth/stscredentials.ts @@ -15,7 +15,7 @@ import {GaxiosError, GaxiosOptions, GaxiosResponse} from 'gaxios'; import * as querystring from 'querystring'; -import {DefaultTransporter} from '../transporters'; +import {DefaultTransporter, Transporter} from '../transporters'; import {Headers} from './oauth2client'; import { ClientAuthentication, @@ -131,7 +131,7 @@ export interface StsSuccessfulResponse { * https://tools.ietf.org/html/rfc8693 */ export class StsCredentials extends OAuthClientAuthHandler { - private transporter: DefaultTransporter; + private transporter: Transporter; /** * Initializes an STS credentials instance.