From 1c86c4c890453ec2f65cc638f8ae882597bb8e9f Mon Sep 17 00:00:00 2001 From: Sourav Chanduka Date: Mon, 16 Aug 2021 14:29:58 +0530 Subject: [PATCH] payload updated --- packages/core/src/oidc-utils.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/core/src/oidc-utils.ts b/packages/core/src/oidc-utils.ts index f529bfa3..c92e6ae2 100644 --- a/packages/core/src/oidc-utils.ts +++ b/packages/core/src/oidc-utils.ts @@ -44,12 +44,12 @@ export class OidcClient { } private static async postCall(httpclient: actions_http_client.HttpClient, id_token_url: string, audience: string): Promise { - - const data : TokenRequest = { aud : !!audience ? '{aud: audience}' : undefined } - debug(`audience is ${audience !== null ? audience : 'null'}`) + const data :TokenRequest = { aud: !!audience ? audience : ''} - const res = await httpclient.postJson(id_token_url,data.aud).catch((error) => { + debug(`audience is ${!!audience ? audience : 'not defined'}`) + + const res = await httpclient.postJson(id_token_url,data).catch((error) => { throw new Error( `Failed to get ID Token. \n Error Code : ${error.statusCode}\n