Can apigee edge share same oauth token in other environment in the same proxy and can get response in like Dev and UAT environment.
I've used Populate cache to store auth token for 1 hour expirey timeout and pass that token to target end point. It is working fine for all enviornment(Dev, QA, UAT). Suddenly i was getting 401 status in UAT for few hours.
Is it possible that it could take token from Dev enviroment in UAT ?
I think you are talking about OAuth tokens issued by Apigee. The set of environments for which those tokens will be valid, is determined by the API Products list. Apigee generates an OAuth token for a specific client app. This app typically uses the client ID + Secret pair as its credentials (for example via client_credentials grant type as defined by IETF RFC 6749), though other app credential types are possible, for example a public/private key pair. Regardless, Apigee generates a token for that specific client ID.
In Apigee, the client ID is mapped to one or more API Products. Those PRODUCTS are enabled on one or more environments.
So, the Apigee-issued token will be good for Dev, QA, UAT, etc.... if you have enabled the API Product to be available on Dev, QA, UAT, etc.
But, you said
@Garima96 wrote:
I've used Populate cache to store auth token for 1 hour expirey timeout and pass that token to target end point.
That tells me you are using this token for ... something other than Apigee. And maybe it's not even Apigee issuing the token. If that is the case then the information I provided above is irrelevant. and I'm not clear on what you're doing or what you're asking.
If the cached token HAS BEEN issued by Apigee, why are you caching it in the API proxy? Why are you using it against a TargetEndpoint? That doesn't make a ton of sense to me. Maybe you could explain.