Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Before, the `http.DefaultClient` was always used. This is e.g. not sufficient, if the server being authenticated against uses TLS certificates signed by a custom root CA. In this case, a custom `http.Client` needs to be passed. This change follows the design of https://github.com/golang/oauth2 and allows passing the HTTP client via `context.Context`. Since the user of a function that accepts a `context.Context` would likely expect it also to be used for HTTP calls, we also pass it to `http.NewRequest`.
- Loading branch information
Showing
3 changed files
with
24 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters