drop usage of obsolete oauth2.Context

This commit is contained in:
Andrew Gerrand
2015-03-05 14:46:56 +11:00
parent a131f81526
commit fa9ecddd2c

View File

@ -203,11 +203,7 @@ type serviceAccount struct {
}
func (s serviceAccount) GetRequestMetadata(ctx context.Context) (map[string]string, error) {
c, ok := ctx.(oauth2.Context)
if !ok {
return nil, fmt.Errorf("credentials: the context %v is invalid", ctx)
}
token, err := s.config.TokenSource(c).Token()
token, err := s.config.TokenSource(ctx).Token()
if err != nil {
return nil, err
}