Commit
This commit is contained in:
commit
d1c8cae2c1
1417 changed files with 326736 additions and 0 deletions
16
node_modules/mongodb/lib/client-side-encryption/providers/gcp.js
generated
vendored
Normal file
16
node_modules/mongodb/lib/client-side-encryption/providers/gcp.js
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.loadGCPCredentials = loadGCPCredentials;
|
||||
const deps_1 = require("../../deps");
|
||||
/** @internal */
|
||||
async function loadGCPCredentials(kmsProviders) {
|
||||
const gcpMetadata = (0, deps_1.getGcpMetadata)();
|
||||
if ('kModuleError' in gcpMetadata) {
|
||||
return kmsProviders;
|
||||
}
|
||||
const { access_token: accessToken } = await gcpMetadata.instance({
|
||||
property: 'service-accounts/default/token'
|
||||
});
|
||||
return { ...kmsProviders, gcp: { accessToken } };
|
||||
}
|
||||
//# sourceMappingURL=gcp.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue