Don't always fetch a OAuth2 token, if the secret from a file didn't change

When configuring a OAuth2 client using the `client_secret_file`
configuration option, the original intent of the code was to *not*
forcefully refetch a token if the content of the file didn't change.

However, both the test and the implementation had 2 typos and a new
token token was fetched on every request through the HTTP client.

Signed-off-by: Jonathan Ballet <jon@multani.info>
2 files changed
tree: ec4658c14527bf1af4f4d18dd5c134b3f592ed05
  1. .circleci/
  2. .github/
  3. assets/
  4. config/
  5. expfmt/
  6. helpers/
  7. model/
  8. promlog/
  9. route/
  10. scripts/
  11. server/
  12. sigv4/
  13. version/
  14. .gitignore
  15. .golangci.yml
  16. .yamllint
  17. CODE_OF_CONDUCT.md
  18. CONTRIBUTING.md
  19. go.mod
  20. go.sum
  21. LICENSE
  22. MAINTAINERS.md
  23. Makefile
  24. Makefile.common
  25. NOTICE
  26. README.md
  27. RELEASE.md
  28. SECURITY.md
README.md

Common

circleci

This repository contains Go libraries that are shared across Prometheus components and libraries. They are considered internal to Prometheus, without any stability guarantees for external usage.

  • assets: Embedding of static assets with gzip support
  • config: Common configuration structures
  • expfmt: Decoding and encoding for the exposition format
  • model: Shared data structures
  • promlog: A logging wrapper around go-kit/log
  • route: A routing wrapper around httprouter using context.Context
  • server: Common servers
  • version: Version information and metrics