# EMG - JWT token validated against both API Proxies and Resource URI in OAUTH

**URL:** <https://discuss.google.dev/t/emg-jwt-token-validated-against-both-api-proxies-and-resource-uri-in-oauth/16836>\
**Category:** Apigee\
**Tags:** api-runtime\
**Created:** [October 12, 2016, 5:53pm UTC](https://discuss.google.dev/t/emg-jwt-token-validated-against-both-api-proxies-and-resource-uri-in-oauth/16836 "2016-10-12T17:53:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous8](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@anonymous8](https://discuss.google.dev/u/anonymous8)\
**Post date:** [October 12, 2016, 5:53pm UTC](https://discuss.google.dev/t/emg-jwt-token-validated-against-both-api-proxies-and-resource-uri-in-oauth/16836/1 "2016-10-12T17:53:34Z")

</div>

The inbuilt plugin for EMG OAuth validates both the APIProxies and Resource URIs in the Product against the JWT token payload product details. Why both needs to be validated (Proxy and Resource URIs)?

If I want to do only resource URI verification, not the API Proxy , is there any way I can do that?

const checkIfAuthorized = module.exports.checkIfAuthorized = function checkIfAuthorized(config, urlPath, proxy, decodedToken)

{ if (!decodedToken.api\_product\_list) { return false; } return decodedToken.api\_product\_list.some(function (product) { const validProxyNames = config.product\_to\_proxy[product]; **if (!validProxyNames) { return false; }** const apiproxies = config.product\_to\_api\_resource[product]; var matchesProxyRules = false; if(apiproxies && apiproxies.length){

---

<div class="post-metadata">

**Author:** ![anonymous8](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@anonymous8](https://discuss.google.dev/u/anonymous8)\
**Post date:** [October 14, 2016, 7:17pm UTC](https://discuss.google.dev/t/emg-jwt-token-validated-against-both-api-proxies-and-resource-uri-in-oauth/16836/2 "2016-10-14T19:17:49Z")

</div>

This behaviour is not consistent with Edge.

[@kevinswiber](https://community.apigee.com/users/980/kswiber.html) - this looks like a defect.

---

<div class="post-metadata">

**Author:** ![anonymous8](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@anonymous8](https://discuss.google.dev/u/anonymous8)\
**Post date:** [May 31, 2017, 10:46am UTC](https://discuss.google.dev/t/emg-jwt-token-validated-against-both-api-proxies-and-resource-uri-in-oauth/16836/3 "2017-05-31T10:46:23Z")

</div>

Was that bug fixed in recent EMG versions?

---

<div class="post-metadata">

**Author:** ![anonymous8](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@anonymous8](https://discuss.google.dev/u/anonymous8)\
**Post date:** [May 31, 2017, 1:04pm UTC](https://discuss.google.dev/t/emg-jwt-token-validated-against-both-api-proxies-and-resource-uri-in-oauth/16836/4 "2017-05-31T13:04:30Z")

</div>

No [@Francois-Xavier KOWALSKI](https://community.apigee.com/users/4106/francois-xavierkowalski.html), this has not been fixed yet.

---

<div class="post-metadata">

**Author:** ![anonymous8](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@anonymous8](https://discuss.google.dev/u/anonymous8)\
**Post date:** [June 26, 2017, 4:26pm UTC](https://discuss.google.dev/t/emg-jwt-token-validated-against-both-api-proxies-and-resource-uri-in-oauth/16836/5 "2017-06-26T16:26:08Z")

</div>

Internal ticket has been labeled cs critical for this bug. Awaiting update from engineering
