oauth2/google: remove unused context parameter from JWTConfigFromJSON

Change-Id: I392ecf76b68f51840a9e4a27596e9ff3724d9128
Reviewed-on: https://go-review.googlesource.com/2732
Reviewed-by: Burcu Dogan <jbd@google.com>
This commit is contained in:
Brad Fitzpatrick 2015-01-13 15:27:09 -08:00
parent 5361962df4
commit 2e66694fea
2 changed files with 2 additions and 2 deletions

View File

@ -63,7 +63,7 @@ func ExampleJWTConfigFromJSON() {
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)
} }
conf, err := google.JWTConfigFromJSON(oauth2.NoContext, data, "https://www.googleapis.com/auth/bigquery") conf, err := google.JWTConfigFromJSON(data, "https://www.googleapis.com/auth/bigquery")
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)
} }

View File

@ -41,7 +41,7 @@ const JWTTokenURL = "https://accounts.google.com/o/oauth2/token"
// the credentials that authorize and authenticate the requests. // the credentials that authorize and authenticate the requests.
// Create a service account on "Credentials" page under "APIs & Auth" for your // Create a service account on "Credentials" page under "APIs & Auth" for your
// project at https://console.developers.google.com to download a JSON key file. // project at https://console.developers.google.com to download a JSON key file.
func JWTConfigFromJSON(ctx oauth2.Context, jsonKey []byte, scope ...string) (*jwt.Config, error) { func JWTConfigFromJSON(jsonKey []byte, scope ...string) (*jwt.Config, error) {
var key struct { var key struct {
Email string `json:"client_email"` Email string `json:"client_email"`
PrivateKey string `json:"private_key"` PrivateKey string `json:"private_key"`