oauth2/google: ConfigFromJSON should support the installed app credentials

client_credentials.json may contain credentials for the installed
applications. Populate the Config depending on what's available in
the JSON key.

Change-Id: I47f494f1c31967a920fe557a9e8c1c4652943c4e
Reviewed-on: https://go-review.googlesource.com/7250
Reviewed-by: Andrew Gerrand <adg@golang.org>
2 files changed
tree: 99d4873bb433e10d8468e630d3c93eb8c9e56f74
  1. github/
  2. google/
  3. internal/
  4. jws/
  5. jwt/
  6. .travis.yml
  7. AUTHORS
  8. client_appengine.go
  9. CONTRIBUTING.md
  10. CONTRIBUTORS
  11. example_test.go
  12. LICENSE
  13. oauth2.go
  14. oauth2_test.go
  15. README.md
  16. token.go
  17. token_test.go
  18. transport.go
  19. transport_test.go
README.md

OAuth2 for Go

Build Status

oauth2 package contains a client implementation for OAuth 2.0 spec.

Installation

go get golang.org/x/oauth2

See godoc for further documentation and examples.