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 Antworten
0
Akzeptierte Antwort

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
EXPERTE
Uri
beantwortet vor 2 Jahren
-1

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

profile picture
Sri
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen