From d1c6b61f68144e587288277a4d19ccd82fa55616 Mon Sep 17 00:00:00 2001 From: RafPe Date: Mon, 9 Dec 2019 15:31:28 +0100 Subject: [PATCH] Fix credentials using AkamaiOPEN-edgegrid-node #1 --- src/utils/env-utils.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/utils/env-utils.ts b/src/utils/env-utils.ts index 1279b40..0229913 100644 --- a/src/utils/env-utils.ts +++ b/src/utils/env-utils.ts @@ -24,8 +24,16 @@ export function getEdgeGrid() { if (_edge != null) { return _edge; } - var s = getEdgeGridSection(edgeRcParams.section); - return new EdgeGrid(s.clientToken, s.clientSecret, s.accessToken, s.host, edgeRcParams.debug); + + // Uses default built library of Akamai to handle all scenarios with + // loading of custom credentials. + // https://github.com/akamai/AkamaiOPEN-edgegrid-node + var eg = new EdgeGrid({ + path: edgeRcParams.path, + section: edgeRcParams.section, + }); + + return eg } export function setDebugMode(debug: boolean) {