|
|
|
@ -40,11 +40,9 @@ func (c *TokenCache) Credentials() (*google.Credentials, error) { |
|
|
|
|
return nil, fmt.Errorf("could not read credentials: %v", err) |
|
|
|
|
} |
|
|
|
|
c.CredentialData, err = google.CredentialsFromJSON(context.Background(), data, c.CredentialScopes...) |
|
|
|
|
err = json.NewDecoder(f).Decode(&c.ConfigData) |
|
|
|
|
if err != nil { |
|
|
|
|
return nil, fmt.Errorf("could not decode config: %v", err) |
|
|
|
|
return nil, fmt.Errorf("could not decode credentials: %v", err) |
|
|
|
|
} |
|
|
|
|
c.configLoaded = true |
|
|
|
|
} |
|
|
|
|
return c.CredentialData, nil |
|
|
|
|
} |
|
|
|
|