Kong/unirest-java

Create OAuth Client Credentials Supplier

ryber opened this issue · 0 comments

ryber commented

Is your feature request related to a problem? Please describe.
APIs often require oAuth bearer tokens. One popular pattern are client credentials. These tokens are easy to get but must be managed and kept fresh without bombarding the identity provider with requests.

Describe the solution you'd like
A config option to maintain a client credential oauth token as specified in https://www.oauth.com/oauth2-servers/access-tokens/client-credentials/

Such a supplier should:

  • Store the token somewhere:
    • In memory
    • Somewhere else provided by the client (like a distributed cache or database)
  • Keep the token refreshed based on its expiration