oauth2: Resource Owner Password Credentials grant

Adds support for the Resource Owner Password Credentials grant type, which
allows trusted clients to exchange user credentials for an access token
directly. This is generally a bad idea, but is extremely useful in some
situations, where an external redirect is undesirable or impossible.

See https://tools.ietf.org/html/rfc6749#section-4.3

Change-Id: I28efd77957bcf8e1174e93ba0c64a990b94eb839
Reviewed-on: https://go-review.googlesource.com/3862
Reviewed-by: Burcu Dogan <jbd@google.com>
2 files changed
tree: 140b19cac023ae60804eacaade7fbcff264f5248
  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.