1 | "use strict";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 | Object.defineProperty(exports, "__esModule", { value: true });
|
15 | exports.AuthPlus = void 0;
|
16 | const google_auth_library_1 = require("google-auth-library");
|
17 | class AuthPlus extends google_auth_library_1.GoogleAuth {
|
18 | constructor() {
|
19 | super(...arguments);
|
20 | this.JWT = google_auth_library_1.JWT;
|
21 | this.Compute = google_auth_library_1.Compute;
|
22 | this.OAuth2 = google_auth_library_1.OAuth2Client;
|
23 | this.GoogleAuth = google_auth_library_1.GoogleAuth;
|
24 | this.AwsClient = google_auth_library_1.AwsClient;
|
25 | this.IdentityPoolClient = google_auth_library_1.IdentityPoolClient;
|
26 | this.ExternalAccountClient = google_auth_library_1.ExternalAccountClient;
|
27 | }
|
28 | |
29 |
|
30 |
|
31 |
|
32 | async getClient(options) {
|
33 | this._cachedAuth = new google_auth_library_1.GoogleAuth(options);
|
34 |
|
35 | return this._cachedAuth.getClient();
|
36 | }
|
37 | getProjectId(callback) {
|
38 | if (callback) {
|
39 | return this._cachedAuth
|
40 | ? this._cachedAuth.getProjectId(callback)
|
41 | : super.getProjectId(callback);
|
42 | }
|
43 | else {
|
44 | return this._cachedAuth
|
45 | ? this._cachedAuth.getProjectId()
|
46 | : super.getProjectId();
|
47 | }
|
48 | }
|
49 | }
|
50 | exports.AuthPlus = AuthPlus;
|
51 |
|
\ | No newline at end of file |