The screenshot below shows 2 subsequent calls to my API. The first call works as expected, while the second returns 403, even though is uses the same exact JWT in the Authorization header.
The execution log for the first call looks like this (I highlighted the token):
The execution log for the second call looks like this (token highlighted again):
And finally, the log from my Authorizer method looks like this (you'll notice it is only called once):
Any pointers? Is it a caching issue with the policy? Something else that pops out?
Found the problem. As described here, the policy returned from the authorizer is cached. That doesn't play well with the fact I was giving access to the specific resource requested - it means the cached policy was only allowing access to the first method I called.