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}"
} 
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠