diff options
author | Niall Sheridan <nsheridan@gmail.com> | 2017-02-19 01:49:51 +0000 |
---|---|---|
committer | Niall Sheridan <nsheridan@gmail.com> | 2017-02-19 01:49:51 +0000 |
commit | eb57eaf30965ba24ff669d6f9c8d11cd24951777 (patch) | |
tree | d04d1e425f0fce5c0f696b8cab7e660630cbd362 /vendor/google.golang.org/api | |
parent | e8ff7ffe8e8c25195c64950b61c6c5754bbcd3ba (diff) |
update dependencies
Diffstat (limited to 'vendor/google.golang.org/api')
-rw-r--r-- | vendor/google.golang.org/api/oauth2/v2/oauth2-gen.go | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/vendor/google.golang.org/api/oauth2/v2/oauth2-gen.go b/vendor/google.golang.org/api/oauth2/v2/oauth2-gen.go index 7440468..c12d1e8 100644 --- a/vendor/google.golang.org/api/oauth2/v2/oauth2-gen.go +++ b/vendor/google.golang.org/api/oauth2/v2/oauth2-gen.go @@ -70,9 +70,10 @@ func New(client *http.Client) (*Service, error) { } type Service struct { - client *http.Client - BasePath string // API endpoint base URL - UserAgent string // optional additional User-Agent fragment + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + GoogleClientHeaderElement string // client header fragment, for Google use only Userinfo *UserinfoService } @@ -84,6 +85,10 @@ func (s *Service) userAgent() string { return googleapi.UserAgent + " " + s.UserAgent } +func (s *Service) clientHeader() string { + return gensupport.GoogleClientHeader("20170210", s.GoogleClientHeaderElement) +} + func NewUserinfoService(s *Service) *UserinfoService { rs := &UserinfoService{s: s} rs.V2 = NewUserinfoV2Service(s) @@ -367,6 +372,7 @@ func (c *GetCertForOpenIdConnectCall) doRequest(alt string) (*http.Response, err reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders.Set("x-goog-api-client", c.s.clientHeader()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } @@ -491,6 +497,7 @@ func (c *TokeninfoCall) doRequest(alt string) (*http.Response, error) { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders.Set("x-goog-api-client", c.s.clientHeader()) var body io.Reader = nil c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "oauth2/v2/tokeninfo") @@ -619,6 +626,7 @@ func (c *UserinfoGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders.Set("x-goog-api-client", c.s.clientHeader()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } @@ -742,6 +750,7 @@ func (c *UserinfoV2MeGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders.Set("x-goog-api-client", c.s.clientHeader()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } |