Issue token from OAuth server and pass it along with HTTP requests
Description
The service must be able to request a token from a standard OAuth server using the client_credentials
flow.
It must first be given a valid client_id
and client_secret
as configuration variables.
It will issue the token when it boots up and the token will be injected into an HTTP client used by the service when calling other services.
The token must be automatically refreshed when it's expiration time is near.
A ready Go library to facilitate this task should be used.
Edited by Cristina Pauna