123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- import { Agent } from 'http';
- import { Credential, GoogleOAuthAccessToken } from './credential';
- export declare class ServiceAccountCredential implements Credential {
- private readonly httpAgent?;
- readonly implicit: boolean;
- readonly projectId: string;
- readonly privateKey: string;
- readonly clientEmail: string;
- private readonly httpClient;
-
- constructor(serviceAccountPathOrObject: string | object, httpAgent?: Agent | undefined, implicit?: boolean);
- getAccessToken(): Promise<GoogleOAuthAccessToken>;
- private createAuthJwt_;
- }
- export declare class ComputeEngineCredential implements Credential {
- private readonly httpClient;
- private readonly httpAgent?;
- private projectId?;
- private accountId?;
- constructor(httpAgent?: Agent);
- getAccessToken(): Promise<GoogleOAuthAccessToken>;
-
- getIDToken(audience: string): Promise<string>;
- getProjectId(): Promise<string>;
- getServiceAccountEmail(): Promise<string>;
- private buildRequest;
- }
- export declare class RefreshTokenCredential implements Credential {
- private readonly httpAgent?;
- readonly implicit: boolean;
- private readonly refreshToken;
- private readonly httpClient;
-
- constructor(refreshTokenPathOrObject: string | object, httpAgent?: Agent | undefined, implicit?: boolean);
- getAccessToken(): Promise<GoogleOAuthAccessToken>;
- }
- export declare class ImpersonatedServiceAccountCredential implements Credential {
- private readonly httpAgent?;
- readonly implicit: boolean;
- private readonly impersonatedServiceAccount;
- private readonly httpClient;
-
- constructor(impersonatedServiceAccountPathOrObject: string | object, httpAgent?: Agent | undefined, implicit?: boolean);
- getAccessToken(): Promise<GoogleOAuthAccessToken>;
- }
- export declare function isApplicationDefault(credential?: Credential): boolean;
- export declare function getApplicationDefault(httpAgent?: Agent): Credential;
|