Skip to content
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

oauth2: add an optional interface to add Context support to TokenSource #393

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yansal
Copy link

@yansal yansal commented Jul 17, 2019

The main motivation for this change is that TokenSource doesn't
support contexts. We would like to access values from an http.Request
context when we are doing the request that generates a new token.

At this stage, this change is just a POC. I'd like to gather reviews
about this approach. If this approach is OK, I'll probably improve docs
and add proper testing.

Fixes golang/go#33131

The main motivation for this change is that TokenSource doesn't
support contexts. We would like to access values from an http.Request
context when we are doing the request that generates a new token.

At this stage, this change is just a POC. I'd like to gather reviews
about this approach. If this approach is OK, I'll probably improve docs
and add proper testing.

Fixes golang/go#33131
@gopherbot
Copy link
Contributor

This PR (HEAD: 859b125) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/oauth2/+/186637 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

x/oauth2/clientcredentials: context values are not passed to oauth2 requests that retrieve tokens
3 participants