From d0b49e1c14c963568c438f6a5e887fb187497b95 Mon Sep 17 00:00:00 2001 From: Edward Romero Date: Tue, 23 Jun 2020 20:16:09 -0400 Subject: [PATCH] add more logging around auth call to verify results --- dist/index.js | 5 ++--- src/authutil.ts | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/index.js b/dist/index.js index f5db7f44..b893fd10 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4722,6 +4722,7 @@ function getAuthToken(authUrl, authUser, authPass) { }); let response = yield httpClient.get(authUrl); let body = yield response.readBody(); + console.log(body); let data = JSON.parse(body); console.log(JSON.stringify(data)); return ''; @@ -4757,9 +4758,7 @@ function writeRegistryToFile(registryUrl, fileLocation, alwaysAuth) { // Check if username and password/token provided const authUser = core.getInput('auth-user'); const authPassword = core.getInput('auth-password'); - const authAccessToken = core.getInput('auth-access-token'); - const authPass = authPassword || authAccessToken; - nodeAuthToken = yield getAuthToken(authUrl, authUser, authPass); + nodeAuthToken = yield getAuthToken(authUrl, authUser, authPassword); } // Remove http: or https: from front of registry. const authString = `${registryUrl.replace(/(^\w+:|^)/, '')}:_authToken=${nodeAuthToken}`; diff --git a/src/authutil.ts b/src/authutil.ts index b4d45b94..f476015b 100644 --- a/src/authutil.ts +++ b/src/authutil.ts @@ -36,6 +36,7 @@ async function getAuthToken( }); let response: hc.HttpClientResponse = await httpClient.get(authUrl); let body: string = await response.readBody(); + console.log(body); let data: any = JSON.parse(body); console.log(JSON.stringify(data)); return '';