commit | 22b0adad7558c54bf49787666d8773cae1dd3e77 | [log] [tgz] |
---|---|---|
author | Andy Zhao <andyzhao@google.com> | Fri Mar 19 19:10:01 2021 +0000 |
committer | Shin Fan <shinfan@google.com> | Tue Mar 23 18:09:02 2021 +0000 |
tree | 3c3d4c179116831a659ae42bfe42abc522fc0ab7 | |
parent | cd4f82c27b84ec2516d3c38a5b5acaf8823e2702 [diff] |
authhandler: Add support for 3-legged-OAuth Added authhandler.go, which implements a TokenSource to support "three-legged OAuth 2.0" via a custom AuthorizationHandler. Added example_test.go with a sample command line implementation for AuthorizationHandler. This patch adds support for 3-legged-OAuth flow using an OAuth Client ID file downloaded from Google Cloud Console. Change-Id: Iefe54494d6f3ee326a6b1b2a81a7d5d1a7ba3331 GitHub-Last-Rev: 48fc0367c2092baf97b8e09f03a94e7fe1ecd890 GitHub-Pull-Request: golang/oauth2#419 Reviewed-on: https://go-review.googlesource.com/c/oauth2/+/232238 Reviewed-by: Tyler Bui-Palsulich <tbp@google.com> Reviewed-by: Shin Fan <shinfan@google.com> Reviewed-by: Cody Oss <codyoss@google.com> Trust: Shin Fan <shinfan@google.com> Trust: Cody Oss <codyoss@google.com>
oauth2 package contains a client implementation for OAuth 2.0 spec.
go get golang.org/x/oauth2
Or you can manually git clone the repository to $(go env GOPATH)/src/golang.org/x/oauth2
.
See pkg.go.dev for further documentation and examples.
We no longer accept new provider-specific packages in this repo if all they do is add a single endpoint variable. If you just want to add a single endpoint, add it to the pkg.go.dev/golang.org/x/oauth2/endpoints package.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.
The main issue tracker for the oauth2 repository is located at https://github.com/golang/oauth2/issues.