The documentation on NewClient states:
Note that if a custom *http.Client is provided via the Context it is used only for token acquisition and is not used to configure the *http.Client returned from NewClient.
However, the implementation looks like it does use the Context-provided client as the underlying round tripper for the non-token-fetching requests. In fact, since the TokenSource is hardcoded as a ReuseTokenSource, it doesn't seem like the context-provided *http.Client is used at all for token acquisition.
Am I totally misreading this? Or is that contradictory, and thus should the documentation (or implementation) change?
If it's not contradictory, *Config.NewClient, doesn't seem to allow for configuration of the underlying transport for non-token-exchange requests. Its documentation even states The returned client and its Transport should not be modified. , so it's unclear how I would configure a proxy server for the non-token-exchange requests, other than, perhaps, configuring http.DefaultClient.
The documentation on
NewClientstates:Note that if a custom *http.Client is provided via the Context it is used only for token acquisition and is not used to configure the *http.Client returned from NewClient.However, the implementation looks like it does use the Context-provided client as the underlying round tripper for the non-token-fetching requests. In fact, since the
TokenSourceis hardcoded as aReuseTokenSource, it doesn't seem like the context-provided*http.Clientis used at all for token acquisition.Am I totally misreading this? Or is that contradictory, and thus should the documentation (or implementation) change?
If it's not contradictory,
*Config.NewClient, doesn't seem to allow for configuration of the underlying transport for non-token-exchange requests. Its documentation even statesThe returned client and its Transport should not be modified., so it's unclear how I would configure a proxy server for the non-token-exchange requests, other than, perhaps, configuringhttp.DefaultClient.