-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AuthenticatedClient objects created too soon #5
Comments
@drnic the fields are all exported and you are not in any way obliged to use the As you note, the only magic is |
Re |
I'm still new to this library, to oauth2 library internals, and to golang http clients + context. Sorry if I'm off the mark in discussing this library. I'll keep working on my sample apps and when you've got time we can look at them, and chat about how to support them nicely in future versions of this lib. |
This is fixed in v0.2.0, which includes a |
It's probably worth opening up another issue regarding the use of certs vs. |
Consider https://github.com/cloudfoundry-community/go-uaa/blob/377005ac1e67d387c4e4ba66000fd3f2f35bda8b/api.go#L145-L148
The
AuthenticatedClient
object is built withclient := &http.Client{Transport: http.DefaultTransport}
, and so does not allow an opportunity for the caller ofNewWithPasswordCredentials
to setup an alternate client (say with custom root CAs).Perhaps
AuthenticatedClient
and UnauthenticatedClient() should be functions that are built as needed usingContextClient()
?For similar reasons, perhaps we do away with
API.SkipSSLValidation
and instead encourage construction of explicit clients? e.g.:Or
The text was updated successfully, but these errors were encountered: