JWT regex for a specific aud

0

When configuring a Cognito Authorizer in API Gateway, a tooltip suggests providing a regex that will pre-validate the audience (aud).

I'm not clear on what the payload will be, so I'm not sure how to write this regex. Is there a sample regex available?

See this link for a screenshot: https://stackoverflow.com/questions/71014006/jwt-regex-for-a-specific-aud

2개 답변
0
수락된 답변

The tooltip actually talks about validating the token, i.e., the header, before sending it to Cognito. I do not think it makes a lot of sense to use it for a Cognito authorizer. It makes more sense when using a Lambda authorizer to make sure that the header contains the value in the right format. This will save you cost in the cases the format is invalid and then API Gateway will not invoke the function.

profile pictureAWS
전문가
Uri
답변함 2년 전
-1

sorry I wasn't able to help, removing my answer

profile picture
Sri
답변함 2년 전

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

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

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

관련 콘텐츠