httpx icon indicating copy to clipboard operation
httpx copied to clipboard

Add RFC 6750 Bearer Token Auth

Open loechel opened this issue 3 months ago • 0 comments

Summary

httpx is a fantastic library for HTTP request handling. For implementing REST API communication it is most often importent to also provide an authentication for transactional endpoints. Therefore a common set of Authentication methods should be avaliable in the httpx library.

This Pull Request adds the commonly used Bearer Token Auhtnetication Method (RFC 6750)

  • Basic Implementation of the BearerTokenAuth RFC
  • Test for BearertokenAuth
  • Documentation

Discussion: https://github.com/encode/httpx/discussions/3675

Checklist

  • [x] I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
  • [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • [x] I've updated the documentation accordingly.

loechel avatar Sep 27 '25 19:09 loechel