@@ -66263,20 +66263,22 @@ async function getAccessToken(tokenRequest) {
66263
66263
throw error;
66264
66264
});
66265
66265
let requestSigner;
66266
- if (config.appServer.auth?.type === 'aws') {
66267
- requestSigner = new dist_cjs.SignatureV4({
66268
- sha256: main.Sha256,
66269
- service: config.appServer.auth.service,
66270
- region: config.appServer.auth.region,
66271
- credentials: (0,credential_providers_dist_cjs.fromWebToken)({
66272
- webIdentityToken: await core.getIDToken('sts.amazonaws.com'),
66273
- roleArn: config.appServer.auth.roleArn,
66274
- durationSeconds: 900, // 15 minutes are the minimum allowed by AWS
66275
- }),
66276
- });
66277
- }
66278
- else {
66279
- throw new Error(`Unsupported app server auth type: ${config.appServer.auth?.type}`);
66266
+ if (config.appServer.auth) {
66267
+ if (config.appServer.auth.type === 'aws') {
66268
+ requestSigner = new dist_cjs.SignatureV4({
66269
+ sha256: main.Sha256,
66270
+ service: config.appServer.auth.service,
66271
+ region: config.appServer.auth.region,
66272
+ credentials: (0,credential_providers_dist_cjs.fromWebToken)({
66273
+ webIdentityToken: await core.getIDToken('sts.amazonaws.com'),
66274
+ roleArn: config.appServer.auth.roleArn,
66275
+ durationSeconds: 900, // 15 minutes are the minimum allowed by AWS
66276
+ }),
66277
+ });
66278
+ }
66279
+ else {
66280
+ throw new Error(`Unsupported app server auth type: ${config.appServer.auth?.type}`);
66281
+ }
66280
66282
}
66281
66283
return await httpRequest({
66282
66284
method: 'POST', requestUrl: new URL('/access_tokens', config.appServer.url).href,
0 commit comments