Am exploring Apigee Edge to be used in the context of following layers:
client browser / app → my serverless functions → Apigee proxy → several external backend services
The backend services are REST with “classic” OAuth 2 access token which after expiry must be renewed with a refresh token. Obviously each backend has their own set of OAuth credentials (client id, secret, access token, refresh token).
Now I’d like to let Apigee manage that token renewal process, ideally it can store the refresh token and can have a simple renewal logic programmed in when querying the backend REST: “if-access-token-expired-then-fetch-a-new-one-with-this-refresh-token-and-continue-with-request” .
How to do this?
Am I looking at the problem from the right angle or there is more suitable solution in the Apigee world given the layers above?