Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Set http header variable based on the oAuth token

Hello,

I'm trying to enable access for multiple customers to my API end point. For that

1. Created an API proxy

2. Created an API product and mapped the proxy as resource

3. Created an App for each customer and mapped the same product (Apigee generated unique credentials for each customer)

Now, when a customer access the API (with oauth token generated with client credentials), I'm trying to add a http header variable by configuring AssignMessage policy. The value of the variable (say, customer code) should be set based on the customer from Apigee. Based on this header variable, I will have some business rules in my back end service.

Can you help me with the right pattern to resolve this use case?

Thanks,

Mahesh.

0 4 253
4 REPLIES 4