Skip to content

Commit 87b4c8e

Browse files
committed
passed username and access key in headers
1 parent 1a4767c commit 87b4c8e

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/lib/httpClient.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import constants from './constants.js';
66
import type { Logger } from 'winston'
77
import pkgJSON from './../../package.json'
88
import https from 'https';
9-
import logger from './logger.js';
109

1110
export default class httpClient {
1211
axiosInstance: AxiosInstance;
@@ -148,7 +147,6 @@ export default class httpClient {
148147
accessKey: env.LT_ACCESS_KEY
149148
}
150149
}, log);
151-
logger.debug(`Response from auth is ${JSON.stringify(response)}`);
152150
if (response && response.projectToken) {
153151
this.projectToken = response.projectToken;
154152
env.PROJECT_TOKEN = response.projectToken;
@@ -185,7 +183,6 @@ export default class httpClient {
185183
accessKey: passWord
186184
}
187185
}, log);
188-
ctx.log.debug(`Response from authExec is ${JSON.stringify(response)}`);
189186
if (response && response.projectToken) {
190187
let orgId = 0;
191188
let userId = 0;
@@ -213,6 +210,10 @@ export default class httpClient {
213210
return this.request({
214211
url: '/build',
215212
method: 'POST',
213+
headers:{
214+
userName,
215+
accessKey
216+
},
216217
data: {
217218
git,
218219
config,
@@ -222,9 +223,7 @@ export default class httpClient {
222223
smartGit,
223224
markBaseline,
224225
baselineBuild,
225-
scheduled,
226-
userName,
227-
accessKey
226+
scheduled
228227
}
229228
}, log)
230229
}

0 commit comments

Comments
 (0)