Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[requests] oauth2 client with access token #70

Open
at15 opened this issue Apr 27, 2018 · 1 comment
Open

[requests] oauth2 client with access token #70

at15 opened this issue Apr 27, 2018 · 1 comment

Comments

@at15
Copy link
Member

at15 commented Apr 27, 2018

Needed by dyweb/Ayi#77, currently using the oauth2 package as example in go-github, however, we only use the token, we don't obtain it, the oauth2 package also introduced dependencies like appengine, protobuf

The implementation in oauth2 is a Transport struct, which modifies header before passing requests to underlying http transport https://github.com/golang/oauth2/blob/master/transport.go NOTE: its token source also handle token expire

We can have more a general implementation, a transport which allows modifying header etc.

@at15
Copy link
Member Author

at15 commented Apr 27, 2018

or maybe we can put it to httputil as #68

at15 added a commit to dyweb/Ayi that referenced this issue Apr 27, 2018
- add example label config from @at15
- introduce golang.org/x/oauth2 for using go-github
  - might write a http transport wrapper in gommon to avoid this
dependency, go-github just need a http client that can inject header
dyweb/gommon#70
- the label is hard coded to at15/papers-i-read
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant