mybuilder/kongfig

Use /<auth-type> endpoint to get all authentications

Open

#98 aperta il 10 nov 2017

Vedi su GitHub
 (1 commento) (0 reazioni) (0 assegnatari)JavaScript (78 fork)batch import
good first issuehelp wanted

Metriche repository

Star
 (373 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

To get all the keys present in Kong, the approach currently being used is:

for_each consumer {
 GET /consumers/:consumer_id_or_name/<auth-type>
}

Recently in Kong, a number of endpoints have been added to auth plugins to ease This will make the process of getting all the keys much more efficient!

To not break things with different Kong versions out there, internally we could hit GET /<auth-type>, if a 404 is returned then we fall back on the iteration approach, but if we get a 200 then, we're good.

Thoughts?

Guida contributor