I have a requirement where JWT token has to be verified. But the proxy will receive two different tokens and they have different audience. Let the values be "audience1" and "audience2".
I referred this answer for a similar issue: https://www.googlecloudcommunity.com/gc/Apigee/Verify-JWT-Audience-and-Scopes-with-3rd-Party-JWKS/m-...
Issue I am facing is that, I am not able to insert a reference value inside the regular expression. Is it possible to do this in Apigee. Or will I have to depend on JS policy.
Also when I construct the regex expression using assign message policy, I am getting an error. Looks like the the string is not being considered as a regular expression.
"expressions.parser.RegexRequired: "Expected a pattern as the RHS of a pattern match expression""
eg: "^.*{reference_value}.*$"