Groovy Script
Explanation
This script performs the following operations:- Finding Token: Finds the
access_tokenfield from request body - Extracting Token: Extracts the token value
- Adding Header: Adds it to Authorization header as Bearer token
This script should be run on the request line (Request Policy) because it uses the
requestBodyTextFromClient and requestHeaderMapToTargetAPI variables.
