Get context.authorizer in Template Mapping

0

Hi there.

I have one Cognito pool and API gateway. They are integrated and working perfectly. I can't get this information from the authorizer. $context.authorizer My main objective is to get the username authenticated. I printed the whole information from context, and every time the context.authorizer was blank.

Example:

{
  "output": "{resourceId=vgw558, authorizer=, resourcePath=/prospect, httpMethod=POST, extendedRequestId=bc3XXXXXAFPdIAMF_xg=, requestTime=11/Nov/2022:19:18:17 +0000, path=/v1/prospect, accountId=62610####7, protocol=HTTP/1.1, requestOverride=, stage=v1, domainPrefix=api-test-dev, requestTimeEpoch=1668194297490, requestId=9ddb6faf-d2e1-####-a205-1c51ef034e64, identity=, domainName=api.mydomain.net, responseOverride=, apiId=2pcvwqifca}"
} 
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南