oauth2/google: fix decode error in Cloud SDK config

google.NewCloudSDK fails to decode credentials file if it contains
service account.
NOTE: the private key in testdata is generated only for this test.

Fixes #86 (https://github.com/golang/oauth2/issues/86).

Change-Id: I9e9e8e10763723d1bf1f953b491aa6e6f3ee760c
Reviewed-on: https://go-review.googlesource.com/4220
Reviewed-by: Andrew Gerrand <adg@golang.org>
3 files changed
tree: f297b49e049da62595f3d83a8f068a157a52d747
  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.