Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Proxy calls to edgemicro-auth/token endpoint within a microgateway instance

We have an Edge Microgateway with the Apigee OAuth plugin protecting our custom plugin.

As you know this requires making a pre-request to the Edge edgemicro-auth proxy to acquire a JWT which is submitted to subsequent requests to our Microgateway instance (where it is validated by the OAuth plugin).

However we would like to make calls to an endpoint exposed by our Microgateway which would in turn proxy a call to the edgemicro-auth token endpoint returning a JWT. E.g.

curl -X POST \
  https://my-microgateway/auth/token \
  -d '{
	"grant_type": "client_credentials", 
	"client_id": "***************", 
	"client_secret": "*****************"
}'

I have considered applying a custom plugin (e.g. get-token) prior to the -oauth plugin but am unsure how to isolate this plugins request/response from the subsequent plugins in the sequence, or if this is even the correct approach.

Any help or suggestions as to how this might be best achieved would be much appreciated.

Michael McD.

0 4 552
4 REPLIES 4