oauth2-gen.go 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206
  1. // Package oauth2 provides access to the Google OAuth2 API.
  2. //
  3. // See https://developers.google.com/accounts/docs/OAuth2
  4. //
  5. // Usage example:
  6. //
  7. // import "google.golang.org/api/oauth2/v1"
  8. // ...
  9. // oauth2Service, err := oauth2.New(oauthHttpClient)
  10. package oauth2 // import "google.golang.org/api/oauth2/v1"
  11. import (
  12. "bytes"
  13. "encoding/json"
  14. "errors"
  15. "fmt"
  16. context "golang.org/x/net/context"
  17. ctxhttp "golang.org/x/net/context/ctxhttp"
  18. gensupport "google.golang.org/api/gensupport"
  19. googleapi "google.golang.org/api/googleapi"
  20. "io"
  21. "net/http"
  22. "net/url"
  23. "strconv"
  24. "strings"
  25. )
  26. // Always reference these packages, just in case the auto-generated code
  27. // below doesn't.
  28. var _ = bytes.NewBuffer
  29. var _ = strconv.Itoa
  30. var _ = fmt.Sprintf
  31. var _ = json.NewDecoder
  32. var _ = io.Copy
  33. var _ = url.Parse
  34. var _ = gensupport.MarshalJSON
  35. var _ = googleapi.Version
  36. var _ = errors.New
  37. var _ = strings.Replace
  38. var _ = context.Canceled
  39. var _ = ctxhttp.Do
  40. const apiId = "oauth2:v1"
  41. const apiName = "oauth2"
  42. const apiVersion = "v1"
  43. const basePath = "https://www.googleapis.com/"
  44. // OAuth2 scopes used by this API.
  45. const (
  46. // Know the list of people in your circles, your age range, and language
  47. PlusLoginScope = "https://www.googleapis.com/auth/plus.login"
  48. // Know who you are on Google
  49. PlusMeScope = "https://www.googleapis.com/auth/plus.me"
  50. // View your email address
  51. UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.email"
  52. // View your basic profile info
  53. UserinfoProfileScope = "https://www.googleapis.com/auth/userinfo.profile"
  54. )
  55. func New(client *http.Client) (*Service, error) {
  56. if client == nil {
  57. return nil, errors.New("client is nil")
  58. }
  59. s := &Service{client: client, BasePath: basePath}
  60. s.Userinfo = NewUserinfoService(s)
  61. return s, nil
  62. }
  63. type Service struct {
  64. client *http.Client
  65. BasePath string // API endpoint base URL
  66. UserAgent string // optional additional User-Agent fragment
  67. Userinfo *UserinfoService
  68. }
  69. func (s *Service) userAgent() string {
  70. if s.UserAgent == "" {
  71. return googleapi.UserAgent
  72. }
  73. return googleapi.UserAgent + " " + s.UserAgent
  74. }
  75. func NewUserinfoService(s *Service) *UserinfoService {
  76. rs := &UserinfoService{s: s}
  77. rs.V2 = NewUserinfoV2Service(s)
  78. return rs
  79. }
  80. type UserinfoService struct {
  81. s *Service
  82. V2 *UserinfoV2Service
  83. }
  84. func NewUserinfoV2Service(s *Service) *UserinfoV2Service {
  85. rs := &UserinfoV2Service{s: s}
  86. rs.Me = NewUserinfoV2MeService(s)
  87. return rs
  88. }
  89. type UserinfoV2Service struct {
  90. s *Service
  91. Me *UserinfoV2MeService
  92. }
  93. func NewUserinfoV2MeService(s *Service) *UserinfoV2MeService {
  94. rs := &UserinfoV2MeService{s: s}
  95. return rs
  96. }
  97. type UserinfoV2MeService struct {
  98. s *Service
  99. }
  100. type Jwk struct {
  101. Keys []*JwkKeys `json:"keys,omitempty"`
  102. // ServerResponse contains the HTTP response code and headers from the
  103. // server.
  104. googleapi.ServerResponse `json:"-"`
  105. // ForceSendFields is a list of field names (e.g. "Keys") to
  106. // unconditionally include in API requests. By default, fields with
  107. // empty values are omitted from API requests. However, any non-pointer,
  108. // non-interface field appearing in ForceSendFields will be sent to the
  109. // server regardless of whether the field is empty or not. This may be
  110. // used to include empty fields in Patch requests.
  111. ForceSendFields []string `json:"-"`
  112. }
  113. func (s *Jwk) MarshalJSON() ([]byte, error) {
  114. type noMethod Jwk
  115. raw := noMethod(*s)
  116. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  117. }
  118. type JwkKeys struct {
  119. Alg string `json:"alg,omitempty"`
  120. E string `json:"e,omitempty"`
  121. Kid string `json:"kid,omitempty"`
  122. Kty string `json:"kty,omitempty"`
  123. N string `json:"n,omitempty"`
  124. Use string `json:"use,omitempty"`
  125. // ForceSendFields is a list of field names (e.g. "Alg") to
  126. // unconditionally include in API requests. By default, fields with
  127. // empty values are omitted from API requests. However, any non-pointer,
  128. // non-interface field appearing in ForceSendFields will be sent to the
  129. // server regardless of whether the field is empty or not. This may be
  130. // used to include empty fields in Patch requests.
  131. ForceSendFields []string `json:"-"`
  132. }
  133. func (s *JwkKeys) MarshalJSON() ([]byte, error) {
  134. type noMethod JwkKeys
  135. raw := noMethod(*s)
  136. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  137. }
  138. type Raw struct {
  139. Keyvalues []*RawKeyvalues `json:"keyvalues,omitempty"`
  140. // ServerResponse contains the HTTP response code and headers from the
  141. // server.
  142. googleapi.ServerResponse `json:"-"`
  143. // ForceSendFields is a list of field names (e.g. "Keyvalues") to
  144. // unconditionally include in API requests. By default, fields with
  145. // empty values are omitted from API requests. However, any non-pointer,
  146. // non-interface field appearing in ForceSendFields will be sent to the
  147. // server regardless of whether the field is empty or not. This may be
  148. // used to include empty fields in Patch requests.
  149. ForceSendFields []string `json:"-"`
  150. }
  151. func (s *Raw) MarshalJSON() ([]byte, error) {
  152. type noMethod Raw
  153. raw := noMethod(*s)
  154. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  155. }
  156. type RawKeyvalues struct {
  157. Algorithm string `json:"algorithm,omitempty"`
  158. Exponent string `json:"exponent,omitempty"`
  159. Keyid string `json:"keyid,omitempty"`
  160. Modulus string `json:"modulus,omitempty"`
  161. // ForceSendFields is a list of field names (e.g. "Algorithm") to
  162. // unconditionally include in API requests. By default, fields with
  163. // empty values are omitted from API requests. However, any non-pointer,
  164. // non-interface field appearing in ForceSendFields will be sent to the
  165. // server regardless of whether the field is empty or not. This may be
  166. // used to include empty fields in Patch requests.
  167. ForceSendFields []string `json:"-"`
  168. }
  169. func (s *RawKeyvalues) MarshalJSON() ([]byte, error) {
  170. type noMethod RawKeyvalues
  171. raw := noMethod(*s)
  172. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  173. }
  174. type Tokeninfo struct {
  175. // AccessType: The access type granted with this token. It can be
  176. // offline or online.
  177. AccessType string `json:"access_type,omitempty"`
  178. // Audience: Who is the intended audience for this token. In general the
  179. // same as issued_to.
  180. Audience string `json:"audience,omitempty"`
  181. // Email: The email address of the user. Present only if the email scope
  182. // is present in the request.
  183. Email string `json:"email,omitempty"`
  184. // EmailVerified: Boolean flag which is true if the email address is
  185. // verified. Present only if the email scope is present in the request.
  186. EmailVerified bool `json:"email_verified,omitempty"`
  187. // ExpiresIn: The expiry time of the token, as number of seconds left
  188. // until expiry.
  189. ExpiresIn int64 `json:"expires_in,omitempty"`
  190. // IssuedAt: The issue time of the token, as number of seconds.
  191. IssuedAt int64 `json:"issued_at,omitempty"`
  192. // IssuedTo: To whom was the token issued to. In general the same as
  193. // audience.
  194. IssuedTo string `json:"issued_to,omitempty"`
  195. // Issuer: Who issued the token.
  196. Issuer string `json:"issuer,omitempty"`
  197. // Nonce: Nonce of the id token.
  198. Nonce string `json:"nonce,omitempty"`
  199. // Scope: The space separated list of scopes granted to this token.
  200. Scope string `json:"scope,omitempty"`
  201. // UserId: The obfuscated user id.
  202. UserId string `json:"user_id,omitempty"`
  203. // VerifiedEmail: Boolean flag which is true if the email address is
  204. // verified. Present only if the email scope is present in the request.
  205. VerifiedEmail bool `json:"verified_email,omitempty"`
  206. // ServerResponse contains the HTTP response code and headers from the
  207. // server.
  208. googleapi.ServerResponse `json:"-"`
  209. // ForceSendFields is a list of field names (e.g. "AccessType") to
  210. // unconditionally include in API requests. By default, fields with
  211. // empty values are omitted from API requests. However, any non-pointer,
  212. // non-interface field appearing in ForceSendFields will be sent to the
  213. // server regardless of whether the field is empty or not. This may be
  214. // used to include empty fields in Patch requests.
  215. ForceSendFields []string `json:"-"`
  216. }
  217. func (s *Tokeninfo) MarshalJSON() ([]byte, error) {
  218. type noMethod Tokeninfo
  219. raw := noMethod(*s)
  220. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  221. }
  222. type Userinfoplus struct {
  223. // Email: The user's email address.
  224. Email string `json:"email,omitempty"`
  225. // FamilyName: The user's last name.
  226. FamilyName string `json:"family_name,omitempty"`
  227. // Gender: The user's gender.
  228. Gender string `json:"gender,omitempty"`
  229. // GivenName: The user's first name.
  230. GivenName string `json:"given_name,omitempty"`
  231. // Hd: The hosted domain e.g. example.com if the user is Google apps
  232. // user.
  233. Hd string `json:"hd,omitempty"`
  234. // Id: The obfuscated ID of the user.
  235. Id string `json:"id,omitempty"`
  236. // Link: URL of the profile page.
  237. Link string `json:"link,omitempty"`
  238. // Locale: The user's preferred locale.
  239. Locale string `json:"locale,omitempty"`
  240. // Name: The user's full name.
  241. Name string `json:"name,omitempty"`
  242. // Picture: URL of the user's picture image.
  243. Picture string `json:"picture,omitempty"`
  244. // VerifiedEmail: Boolean flag which is true if the email address is
  245. // verified. Always verified because we only return the user's primary
  246. // email address.
  247. //
  248. // Default: true
  249. VerifiedEmail *bool `json:"verified_email,omitempty"`
  250. // ServerResponse contains the HTTP response code and headers from the
  251. // server.
  252. googleapi.ServerResponse `json:"-"`
  253. // ForceSendFields is a list of field names (e.g. "Email") to
  254. // unconditionally include in API requests. By default, fields with
  255. // empty values are omitted from API requests. However, any non-pointer,
  256. // non-interface field appearing in ForceSendFields will be sent to the
  257. // server regardless of whether the field is empty or not. This may be
  258. // used to include empty fields in Patch requests.
  259. ForceSendFields []string `json:"-"`
  260. }
  261. func (s *Userinfoplus) MarshalJSON() ([]byte, error) {
  262. type noMethod Userinfoplus
  263. raw := noMethod(*s)
  264. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  265. }
  266. // method id "oauth2.getCertForOpenIdConnect":
  267. type GetCertForOpenIdConnectCall struct {
  268. s *Service
  269. urlParams_ gensupport.URLParams
  270. ifNoneMatch_ string
  271. ctx_ context.Context
  272. }
  273. // GetCertForOpenIdConnect:
  274. func (s *Service) GetCertForOpenIdConnect() *GetCertForOpenIdConnectCall {
  275. c := &GetCertForOpenIdConnectCall{s: s, urlParams_: make(gensupport.URLParams)}
  276. return c
  277. }
  278. // Fields allows partial responses to be retrieved. See
  279. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  280. // for more information.
  281. func (c *GetCertForOpenIdConnectCall) Fields(s ...googleapi.Field) *GetCertForOpenIdConnectCall {
  282. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  283. return c
  284. }
  285. // IfNoneMatch sets the optional parameter which makes the operation
  286. // fail if the object's ETag matches the given value. This is useful for
  287. // getting updates only after the object has changed since the last
  288. // request. Use googleapi.IsNotModified to check whether the response
  289. // error from Do is the result of In-None-Match.
  290. func (c *GetCertForOpenIdConnectCall) IfNoneMatch(entityTag string) *GetCertForOpenIdConnectCall {
  291. c.ifNoneMatch_ = entityTag
  292. return c
  293. }
  294. // Context sets the context to be used in this call's Do method. Any
  295. // pending HTTP request will be aborted if the provided context is
  296. // canceled.
  297. func (c *GetCertForOpenIdConnectCall) Context(ctx context.Context) *GetCertForOpenIdConnectCall {
  298. c.ctx_ = ctx
  299. return c
  300. }
  301. func (c *GetCertForOpenIdConnectCall) doRequest(alt string) (*http.Response, error) {
  302. var body io.Reader = nil
  303. c.urlParams_.Set("alt", alt)
  304. urls := googleapi.ResolveRelative(c.s.BasePath, "oauth2/v1/certs")
  305. urls += "?" + c.urlParams_.Encode()
  306. req, _ := http.NewRequest("GET", urls, body)
  307. googleapi.SetOpaque(req.URL)
  308. req.Header.Set("User-Agent", c.s.userAgent())
  309. if c.ifNoneMatch_ != "" {
  310. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  311. }
  312. if c.ctx_ != nil {
  313. return ctxhttp.Do(c.ctx_, c.s.client, req)
  314. }
  315. return c.s.client.Do(req)
  316. }
  317. // Do executes the "oauth2.getCertForOpenIdConnect" call.
  318. func (c *GetCertForOpenIdConnectCall) Do(opts ...googleapi.CallOption) (map[string]string, error) {
  319. gensupport.SetOptions(c.urlParams_, opts...)
  320. res, err := c.doRequest("json")
  321. if err != nil {
  322. return nil, err
  323. }
  324. defer googleapi.CloseBody(res)
  325. if err := googleapi.CheckResponse(res); err != nil {
  326. return nil, err
  327. }
  328. var ret map[string]string
  329. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  330. return nil, err
  331. }
  332. return ret, nil
  333. // {
  334. // "httpMethod": "GET",
  335. // "id": "oauth2.getCertForOpenIdConnect",
  336. // "path": "oauth2/v1/certs",
  337. // "response": {
  338. // "$ref": "X509"
  339. // }
  340. // }
  341. }
  342. // method id "oauth2.getCertForOpenIdConnectRaw":
  343. type GetCertForOpenIdConnectRawCall struct {
  344. s *Service
  345. urlParams_ gensupport.URLParams
  346. ifNoneMatch_ string
  347. ctx_ context.Context
  348. }
  349. // GetCertForOpenIdConnectRaw:
  350. func (s *Service) GetCertForOpenIdConnectRaw() *GetCertForOpenIdConnectRawCall {
  351. c := &GetCertForOpenIdConnectRawCall{s: s, urlParams_: make(gensupport.URLParams)}
  352. return c
  353. }
  354. // Fields allows partial responses to be retrieved. See
  355. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  356. // for more information.
  357. func (c *GetCertForOpenIdConnectRawCall) Fields(s ...googleapi.Field) *GetCertForOpenIdConnectRawCall {
  358. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  359. return c
  360. }
  361. // IfNoneMatch sets the optional parameter which makes the operation
  362. // fail if the object's ETag matches the given value. This is useful for
  363. // getting updates only after the object has changed since the last
  364. // request. Use googleapi.IsNotModified to check whether the response
  365. // error from Do is the result of In-None-Match.
  366. func (c *GetCertForOpenIdConnectRawCall) IfNoneMatch(entityTag string) *GetCertForOpenIdConnectRawCall {
  367. c.ifNoneMatch_ = entityTag
  368. return c
  369. }
  370. // Context sets the context to be used in this call's Do method. Any
  371. // pending HTTP request will be aborted if the provided context is
  372. // canceled.
  373. func (c *GetCertForOpenIdConnectRawCall) Context(ctx context.Context) *GetCertForOpenIdConnectRawCall {
  374. c.ctx_ = ctx
  375. return c
  376. }
  377. func (c *GetCertForOpenIdConnectRawCall) doRequest(alt string) (*http.Response, error) {
  378. var body io.Reader = nil
  379. c.urlParams_.Set("alt", alt)
  380. urls := googleapi.ResolveRelative(c.s.BasePath, "oauth2/v1/raw_public_keys")
  381. urls += "?" + c.urlParams_.Encode()
  382. req, _ := http.NewRequest("GET", urls, body)
  383. googleapi.SetOpaque(req.URL)
  384. req.Header.Set("User-Agent", c.s.userAgent())
  385. if c.ifNoneMatch_ != "" {
  386. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  387. }
  388. if c.ctx_ != nil {
  389. return ctxhttp.Do(c.ctx_, c.s.client, req)
  390. }
  391. return c.s.client.Do(req)
  392. }
  393. // Do executes the "oauth2.getCertForOpenIdConnectRaw" call.
  394. // Exactly one of *Raw or error will be non-nil. Any non-2xx status code
  395. // is an error. Response headers are in either
  396. // *Raw.ServerResponse.Header or (if a response was returned at all) in
  397. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  398. // whether the returned error was because http.StatusNotModified was
  399. // returned.
  400. func (c *GetCertForOpenIdConnectRawCall) Do(opts ...googleapi.CallOption) (*Raw, error) {
  401. gensupport.SetOptions(c.urlParams_, opts...)
  402. res, err := c.doRequest("json")
  403. if res != nil && res.StatusCode == http.StatusNotModified {
  404. if res.Body != nil {
  405. res.Body.Close()
  406. }
  407. return nil, &googleapi.Error{
  408. Code: res.StatusCode,
  409. Header: res.Header,
  410. }
  411. }
  412. if err != nil {
  413. return nil, err
  414. }
  415. defer googleapi.CloseBody(res)
  416. if err := googleapi.CheckResponse(res); err != nil {
  417. return nil, err
  418. }
  419. ret := &Raw{
  420. ServerResponse: googleapi.ServerResponse{
  421. Header: res.Header,
  422. HTTPStatusCode: res.StatusCode,
  423. },
  424. }
  425. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  426. return nil, err
  427. }
  428. return ret, nil
  429. // {
  430. // "httpMethod": "GET",
  431. // "id": "oauth2.getCertForOpenIdConnectRaw",
  432. // "path": "oauth2/v1/raw_public_keys",
  433. // "response": {
  434. // "$ref": "Raw"
  435. // }
  436. // }
  437. }
  438. // method id "oauth2.getRobotJwk":
  439. type GetRobotJwkCall struct {
  440. s *Service
  441. robotEmail string
  442. urlParams_ gensupport.URLParams
  443. ifNoneMatch_ string
  444. ctx_ context.Context
  445. }
  446. // GetRobotJwk:
  447. func (s *Service) GetRobotJwk(robotEmail string) *GetRobotJwkCall {
  448. c := &GetRobotJwkCall{s: s, urlParams_: make(gensupport.URLParams)}
  449. c.robotEmail = robotEmail
  450. return c
  451. }
  452. // Fields allows partial responses to be retrieved. See
  453. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  454. // for more information.
  455. func (c *GetRobotJwkCall) Fields(s ...googleapi.Field) *GetRobotJwkCall {
  456. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  457. return c
  458. }
  459. // IfNoneMatch sets the optional parameter which makes the operation
  460. // fail if the object's ETag matches the given value. This is useful for
  461. // getting updates only after the object has changed since the last
  462. // request. Use googleapi.IsNotModified to check whether the response
  463. // error from Do is the result of In-None-Match.
  464. func (c *GetRobotJwkCall) IfNoneMatch(entityTag string) *GetRobotJwkCall {
  465. c.ifNoneMatch_ = entityTag
  466. return c
  467. }
  468. // Context sets the context to be used in this call's Do method. Any
  469. // pending HTTP request will be aborted if the provided context is
  470. // canceled.
  471. func (c *GetRobotJwkCall) Context(ctx context.Context) *GetRobotJwkCall {
  472. c.ctx_ = ctx
  473. return c
  474. }
  475. func (c *GetRobotJwkCall) doRequest(alt string) (*http.Response, error) {
  476. var body io.Reader = nil
  477. c.urlParams_.Set("alt", alt)
  478. urls := googleapi.ResolveRelative(c.s.BasePath, "service_accounts/v1/jwk/{robotEmail}")
  479. urls += "?" + c.urlParams_.Encode()
  480. req, _ := http.NewRequest("GET", urls, body)
  481. googleapi.Expand(req.URL, map[string]string{
  482. "robotEmail": c.robotEmail,
  483. })
  484. req.Header.Set("User-Agent", c.s.userAgent())
  485. if c.ifNoneMatch_ != "" {
  486. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  487. }
  488. if c.ctx_ != nil {
  489. return ctxhttp.Do(c.ctx_, c.s.client, req)
  490. }
  491. return c.s.client.Do(req)
  492. }
  493. // Do executes the "oauth2.getRobotJwk" call.
  494. // Exactly one of *Jwk or error will be non-nil. Any non-2xx status code
  495. // is an error. Response headers are in either
  496. // *Jwk.ServerResponse.Header or (if a response was returned at all) in
  497. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  498. // whether the returned error was because http.StatusNotModified was
  499. // returned.
  500. func (c *GetRobotJwkCall) Do(opts ...googleapi.CallOption) (*Jwk, error) {
  501. gensupport.SetOptions(c.urlParams_, opts...)
  502. res, err := c.doRequest("json")
  503. if res != nil && res.StatusCode == http.StatusNotModified {
  504. if res.Body != nil {
  505. res.Body.Close()
  506. }
  507. return nil, &googleapi.Error{
  508. Code: res.StatusCode,
  509. Header: res.Header,
  510. }
  511. }
  512. if err != nil {
  513. return nil, err
  514. }
  515. defer googleapi.CloseBody(res)
  516. if err := googleapi.CheckResponse(res); err != nil {
  517. return nil, err
  518. }
  519. ret := &Jwk{
  520. ServerResponse: googleapi.ServerResponse{
  521. Header: res.Header,
  522. HTTPStatusCode: res.StatusCode,
  523. },
  524. }
  525. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  526. return nil, err
  527. }
  528. return ret, nil
  529. // {
  530. // "httpMethod": "GET",
  531. // "id": "oauth2.getRobotJwk",
  532. // "parameterOrder": [
  533. // "robotEmail"
  534. // ],
  535. // "parameters": {
  536. // "robotEmail": {
  537. // "description": "The email of robot account.",
  538. // "location": "path",
  539. // "required": true,
  540. // "type": "string"
  541. // }
  542. // },
  543. // "path": "service_accounts/v1/jwk/{robotEmail}",
  544. // "response": {
  545. // "$ref": "Jwk"
  546. // }
  547. // }
  548. }
  549. // method id "oauth2.getRobotMetadataRaw":
  550. type GetRobotMetadataRawCall struct {
  551. s *Service
  552. robotEmail string
  553. urlParams_ gensupport.URLParams
  554. ifNoneMatch_ string
  555. ctx_ context.Context
  556. }
  557. // GetRobotMetadataRaw:
  558. func (s *Service) GetRobotMetadataRaw(robotEmail string) *GetRobotMetadataRawCall {
  559. c := &GetRobotMetadataRawCall{s: s, urlParams_: make(gensupport.URLParams)}
  560. c.robotEmail = robotEmail
  561. return c
  562. }
  563. // Fields allows partial responses to be retrieved. See
  564. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  565. // for more information.
  566. func (c *GetRobotMetadataRawCall) Fields(s ...googleapi.Field) *GetRobotMetadataRawCall {
  567. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  568. return c
  569. }
  570. // IfNoneMatch sets the optional parameter which makes the operation
  571. // fail if the object's ETag matches the given value. This is useful for
  572. // getting updates only after the object has changed since the last
  573. // request. Use googleapi.IsNotModified to check whether the response
  574. // error from Do is the result of In-None-Match.
  575. func (c *GetRobotMetadataRawCall) IfNoneMatch(entityTag string) *GetRobotMetadataRawCall {
  576. c.ifNoneMatch_ = entityTag
  577. return c
  578. }
  579. // Context sets the context to be used in this call's Do method. Any
  580. // pending HTTP request will be aborted if the provided context is
  581. // canceled.
  582. func (c *GetRobotMetadataRawCall) Context(ctx context.Context) *GetRobotMetadataRawCall {
  583. c.ctx_ = ctx
  584. return c
  585. }
  586. func (c *GetRobotMetadataRawCall) doRequest(alt string) (*http.Response, error) {
  587. var body io.Reader = nil
  588. c.urlParams_.Set("alt", alt)
  589. urls := googleapi.ResolveRelative(c.s.BasePath, "service_accounts/v1/metadata/raw/{robotEmail}")
  590. urls += "?" + c.urlParams_.Encode()
  591. req, _ := http.NewRequest("GET", urls, body)
  592. googleapi.Expand(req.URL, map[string]string{
  593. "robotEmail": c.robotEmail,
  594. })
  595. req.Header.Set("User-Agent", c.s.userAgent())
  596. if c.ifNoneMatch_ != "" {
  597. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  598. }
  599. if c.ctx_ != nil {
  600. return ctxhttp.Do(c.ctx_, c.s.client, req)
  601. }
  602. return c.s.client.Do(req)
  603. }
  604. // Do executes the "oauth2.getRobotMetadataRaw" call.
  605. // Exactly one of *Raw or error will be non-nil. Any non-2xx status code
  606. // is an error. Response headers are in either
  607. // *Raw.ServerResponse.Header or (if a response was returned at all) in
  608. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  609. // whether the returned error was because http.StatusNotModified was
  610. // returned.
  611. func (c *GetRobotMetadataRawCall) Do(opts ...googleapi.CallOption) (*Raw, error) {
  612. gensupport.SetOptions(c.urlParams_, opts...)
  613. res, err := c.doRequest("json")
  614. if res != nil && res.StatusCode == http.StatusNotModified {
  615. if res.Body != nil {
  616. res.Body.Close()
  617. }
  618. return nil, &googleapi.Error{
  619. Code: res.StatusCode,
  620. Header: res.Header,
  621. }
  622. }
  623. if err != nil {
  624. return nil, err
  625. }
  626. defer googleapi.CloseBody(res)
  627. if err := googleapi.CheckResponse(res); err != nil {
  628. return nil, err
  629. }
  630. ret := &Raw{
  631. ServerResponse: googleapi.ServerResponse{
  632. Header: res.Header,
  633. HTTPStatusCode: res.StatusCode,
  634. },
  635. }
  636. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  637. return nil, err
  638. }
  639. return ret, nil
  640. // {
  641. // "httpMethod": "GET",
  642. // "id": "oauth2.getRobotMetadataRaw",
  643. // "parameterOrder": [
  644. // "robotEmail"
  645. // ],
  646. // "parameters": {
  647. // "robotEmail": {
  648. // "description": "The email of robot account.",
  649. // "location": "path",
  650. // "required": true,
  651. // "type": "string"
  652. // }
  653. // },
  654. // "path": "service_accounts/v1/metadata/raw/{robotEmail}",
  655. // "response": {
  656. // "$ref": "Raw"
  657. // }
  658. // }
  659. }
  660. // method id "oauth2.getRobotMetadataX509":
  661. type GetRobotMetadataX509Call struct {
  662. s *Service
  663. robotEmail string
  664. urlParams_ gensupport.URLParams
  665. ifNoneMatch_ string
  666. ctx_ context.Context
  667. }
  668. // GetRobotMetadataX509:
  669. func (s *Service) GetRobotMetadataX509(robotEmail string) *GetRobotMetadataX509Call {
  670. c := &GetRobotMetadataX509Call{s: s, urlParams_: make(gensupport.URLParams)}
  671. c.robotEmail = robotEmail
  672. return c
  673. }
  674. // Fields allows partial responses to be retrieved. See
  675. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  676. // for more information.
  677. func (c *GetRobotMetadataX509Call) Fields(s ...googleapi.Field) *GetRobotMetadataX509Call {
  678. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  679. return c
  680. }
  681. // IfNoneMatch sets the optional parameter which makes the operation
  682. // fail if the object's ETag matches the given value. This is useful for
  683. // getting updates only after the object has changed since the last
  684. // request. Use googleapi.IsNotModified to check whether the response
  685. // error from Do is the result of In-None-Match.
  686. func (c *GetRobotMetadataX509Call) IfNoneMatch(entityTag string) *GetRobotMetadataX509Call {
  687. c.ifNoneMatch_ = entityTag
  688. return c
  689. }
  690. // Context sets the context to be used in this call's Do method. Any
  691. // pending HTTP request will be aborted if the provided context is
  692. // canceled.
  693. func (c *GetRobotMetadataX509Call) Context(ctx context.Context) *GetRobotMetadataX509Call {
  694. c.ctx_ = ctx
  695. return c
  696. }
  697. func (c *GetRobotMetadataX509Call) doRequest(alt string) (*http.Response, error) {
  698. var body io.Reader = nil
  699. c.urlParams_.Set("alt", alt)
  700. urls := googleapi.ResolveRelative(c.s.BasePath, "service_accounts/v1/metadata/x509/{robotEmail}")
  701. urls += "?" + c.urlParams_.Encode()
  702. req, _ := http.NewRequest("GET", urls, body)
  703. googleapi.Expand(req.URL, map[string]string{
  704. "robotEmail": c.robotEmail,
  705. })
  706. req.Header.Set("User-Agent", c.s.userAgent())
  707. if c.ifNoneMatch_ != "" {
  708. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  709. }
  710. if c.ctx_ != nil {
  711. return ctxhttp.Do(c.ctx_, c.s.client, req)
  712. }
  713. return c.s.client.Do(req)
  714. }
  715. // Do executes the "oauth2.getRobotMetadataX509" call.
  716. func (c *GetRobotMetadataX509Call) Do(opts ...googleapi.CallOption) (map[string]string, error) {
  717. gensupport.SetOptions(c.urlParams_, opts...)
  718. res, err := c.doRequest("json")
  719. if err != nil {
  720. return nil, err
  721. }
  722. defer googleapi.CloseBody(res)
  723. if err := googleapi.CheckResponse(res); err != nil {
  724. return nil, err
  725. }
  726. var ret map[string]string
  727. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  728. return nil, err
  729. }
  730. return ret, nil
  731. // {
  732. // "httpMethod": "GET",
  733. // "id": "oauth2.getRobotMetadataX509",
  734. // "parameterOrder": [
  735. // "robotEmail"
  736. // ],
  737. // "parameters": {
  738. // "robotEmail": {
  739. // "description": "The email of robot account.",
  740. // "location": "path",
  741. // "required": true,
  742. // "type": "string"
  743. // }
  744. // },
  745. // "path": "service_accounts/v1/metadata/x509/{robotEmail}",
  746. // "response": {
  747. // "$ref": "X509"
  748. // }
  749. // }
  750. }
  751. // method id "oauth2.tokeninfo":
  752. type TokeninfoCall struct {
  753. s *Service
  754. urlParams_ gensupport.URLParams
  755. ctx_ context.Context
  756. }
  757. // Tokeninfo: Get token info
  758. func (s *Service) Tokeninfo() *TokeninfoCall {
  759. c := &TokeninfoCall{s: s, urlParams_: make(gensupport.URLParams)}
  760. return c
  761. }
  762. // AccessToken sets the optional parameter "access_token": The oauth2
  763. // access token
  764. func (c *TokeninfoCall) AccessToken(accessToken string) *TokeninfoCall {
  765. c.urlParams_.Set("access_token", accessToken)
  766. return c
  767. }
  768. // IdToken sets the optional parameter "id_token": The ID token
  769. func (c *TokeninfoCall) IdToken(idToken string) *TokeninfoCall {
  770. c.urlParams_.Set("id_token", idToken)
  771. return c
  772. }
  773. // Fields allows partial responses to be retrieved. See
  774. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  775. // for more information.
  776. func (c *TokeninfoCall) Fields(s ...googleapi.Field) *TokeninfoCall {
  777. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  778. return c
  779. }
  780. // Context sets the context to be used in this call's Do method. Any
  781. // pending HTTP request will be aborted if the provided context is
  782. // canceled.
  783. func (c *TokeninfoCall) Context(ctx context.Context) *TokeninfoCall {
  784. c.ctx_ = ctx
  785. return c
  786. }
  787. func (c *TokeninfoCall) doRequest(alt string) (*http.Response, error) {
  788. var body io.Reader = nil
  789. c.urlParams_.Set("alt", alt)
  790. urls := googleapi.ResolveRelative(c.s.BasePath, "oauth2/v1/tokeninfo")
  791. urls += "?" + c.urlParams_.Encode()
  792. req, _ := http.NewRequest("POST", urls, body)
  793. googleapi.SetOpaque(req.URL)
  794. req.Header.Set("User-Agent", c.s.userAgent())
  795. if c.ctx_ != nil {
  796. return ctxhttp.Do(c.ctx_, c.s.client, req)
  797. }
  798. return c.s.client.Do(req)
  799. }
  800. // Do executes the "oauth2.tokeninfo" call.
  801. // Exactly one of *Tokeninfo or error will be non-nil. Any non-2xx
  802. // status code is an error. Response headers are in either
  803. // *Tokeninfo.ServerResponse.Header or (if a response was returned at
  804. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  805. // to check whether the returned error was because
  806. // http.StatusNotModified was returned.
  807. func (c *TokeninfoCall) Do(opts ...googleapi.CallOption) (*Tokeninfo, error) {
  808. gensupport.SetOptions(c.urlParams_, opts...)
  809. res, err := c.doRequest("json")
  810. if res != nil && res.StatusCode == http.StatusNotModified {
  811. if res.Body != nil {
  812. res.Body.Close()
  813. }
  814. return nil, &googleapi.Error{
  815. Code: res.StatusCode,
  816. Header: res.Header,
  817. }
  818. }
  819. if err != nil {
  820. return nil, err
  821. }
  822. defer googleapi.CloseBody(res)
  823. if err := googleapi.CheckResponse(res); err != nil {
  824. return nil, err
  825. }
  826. ret := &Tokeninfo{
  827. ServerResponse: googleapi.ServerResponse{
  828. Header: res.Header,
  829. HTTPStatusCode: res.StatusCode,
  830. },
  831. }
  832. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  833. return nil, err
  834. }
  835. return ret, nil
  836. // {
  837. // "description": "Get token info",
  838. // "httpMethod": "POST",
  839. // "id": "oauth2.tokeninfo",
  840. // "parameters": {
  841. // "access_token": {
  842. // "description": "The oauth2 access token",
  843. // "location": "query",
  844. // "type": "string"
  845. // },
  846. // "id_token": {
  847. // "description": "The ID token",
  848. // "location": "query",
  849. // "type": "string"
  850. // }
  851. // },
  852. // "path": "oauth2/v1/tokeninfo",
  853. // "response": {
  854. // "$ref": "Tokeninfo"
  855. // }
  856. // }
  857. }
  858. // method id "oauth2.userinfo.get":
  859. type UserinfoGetCall struct {
  860. s *Service
  861. urlParams_ gensupport.URLParams
  862. ifNoneMatch_ string
  863. ctx_ context.Context
  864. }
  865. // Get: Get user info
  866. func (r *UserinfoService) Get() *UserinfoGetCall {
  867. c := &UserinfoGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  868. return c
  869. }
  870. // Fields allows partial responses to be retrieved. See
  871. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  872. // for more information.
  873. func (c *UserinfoGetCall) Fields(s ...googleapi.Field) *UserinfoGetCall {
  874. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  875. return c
  876. }
  877. // IfNoneMatch sets the optional parameter which makes the operation
  878. // fail if the object's ETag matches the given value. This is useful for
  879. // getting updates only after the object has changed since the last
  880. // request. Use googleapi.IsNotModified to check whether the response
  881. // error from Do is the result of In-None-Match.
  882. func (c *UserinfoGetCall) IfNoneMatch(entityTag string) *UserinfoGetCall {
  883. c.ifNoneMatch_ = entityTag
  884. return c
  885. }
  886. // Context sets the context to be used in this call's Do method. Any
  887. // pending HTTP request will be aborted if the provided context is
  888. // canceled.
  889. func (c *UserinfoGetCall) Context(ctx context.Context) *UserinfoGetCall {
  890. c.ctx_ = ctx
  891. return c
  892. }
  893. func (c *UserinfoGetCall) doRequest(alt string) (*http.Response, error) {
  894. var body io.Reader = nil
  895. c.urlParams_.Set("alt", alt)
  896. urls := googleapi.ResolveRelative(c.s.BasePath, "oauth2/v1/userinfo")
  897. urls += "?" + c.urlParams_.Encode()
  898. req, _ := http.NewRequest("GET", urls, body)
  899. googleapi.SetOpaque(req.URL)
  900. req.Header.Set("User-Agent", c.s.userAgent())
  901. if c.ifNoneMatch_ != "" {
  902. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  903. }
  904. if c.ctx_ != nil {
  905. return ctxhttp.Do(c.ctx_, c.s.client, req)
  906. }
  907. return c.s.client.Do(req)
  908. }
  909. // Do executes the "oauth2.userinfo.get" call.
  910. // Exactly one of *Userinfoplus or error will be non-nil. Any non-2xx
  911. // status code is an error. Response headers are in either
  912. // *Userinfoplus.ServerResponse.Header or (if a response was returned at
  913. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  914. // to check whether the returned error was because
  915. // http.StatusNotModified was returned.
  916. func (c *UserinfoGetCall) Do(opts ...googleapi.CallOption) (*Userinfoplus, error) {
  917. gensupport.SetOptions(c.urlParams_, opts...)
  918. res, err := c.doRequest("json")
  919. if res != nil && res.StatusCode == http.StatusNotModified {
  920. if res.Body != nil {
  921. res.Body.Close()
  922. }
  923. return nil, &googleapi.Error{
  924. Code: res.StatusCode,
  925. Header: res.Header,
  926. }
  927. }
  928. if err != nil {
  929. return nil, err
  930. }
  931. defer googleapi.CloseBody(res)
  932. if err := googleapi.CheckResponse(res); err != nil {
  933. return nil, err
  934. }
  935. ret := &Userinfoplus{
  936. ServerResponse: googleapi.ServerResponse{
  937. Header: res.Header,
  938. HTTPStatusCode: res.StatusCode,
  939. },
  940. }
  941. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  942. return nil, err
  943. }
  944. return ret, nil
  945. // {
  946. // "description": "Get user info",
  947. // "httpMethod": "GET",
  948. // "id": "oauth2.userinfo.get",
  949. // "path": "oauth2/v1/userinfo",
  950. // "response": {
  951. // "$ref": "Userinfoplus"
  952. // },
  953. // "scopes": [
  954. // "https://www.googleapis.com/auth/plus.login",
  955. // "https://www.googleapis.com/auth/plus.me",
  956. // "https://www.googleapis.com/auth/userinfo.email",
  957. // "https://www.googleapis.com/auth/userinfo.profile"
  958. // ]
  959. // }
  960. }
  961. // method id "oauth2.userinfo.v2.me.get":
  962. type UserinfoV2MeGetCall struct {
  963. s *Service
  964. urlParams_ gensupport.URLParams
  965. ifNoneMatch_ string
  966. ctx_ context.Context
  967. }
  968. // Get: Get user info
  969. func (r *UserinfoV2MeService) Get() *UserinfoV2MeGetCall {
  970. c := &UserinfoV2MeGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  971. return c
  972. }
  973. // Fields allows partial responses to be retrieved. See
  974. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  975. // for more information.
  976. func (c *UserinfoV2MeGetCall) Fields(s ...googleapi.Field) *UserinfoV2MeGetCall {
  977. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  978. return c
  979. }
  980. // IfNoneMatch sets the optional parameter which makes the operation
  981. // fail if the object's ETag matches the given value. This is useful for
  982. // getting updates only after the object has changed since the last
  983. // request. Use googleapi.IsNotModified to check whether the response
  984. // error from Do is the result of In-None-Match.
  985. func (c *UserinfoV2MeGetCall) IfNoneMatch(entityTag string) *UserinfoV2MeGetCall {
  986. c.ifNoneMatch_ = entityTag
  987. return c
  988. }
  989. // Context sets the context to be used in this call's Do method. Any
  990. // pending HTTP request will be aborted if the provided context is
  991. // canceled.
  992. func (c *UserinfoV2MeGetCall) Context(ctx context.Context) *UserinfoV2MeGetCall {
  993. c.ctx_ = ctx
  994. return c
  995. }
  996. func (c *UserinfoV2MeGetCall) doRequest(alt string) (*http.Response, error) {
  997. var body io.Reader = nil
  998. c.urlParams_.Set("alt", alt)
  999. urls := googleapi.ResolveRelative(c.s.BasePath, "userinfo/v2/me")
  1000. urls += "?" + c.urlParams_.Encode()
  1001. req, _ := http.NewRequest("GET", urls, body)
  1002. googleapi.SetOpaque(req.URL)
  1003. req.Header.Set("User-Agent", c.s.userAgent())
  1004. if c.ifNoneMatch_ != "" {
  1005. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  1006. }
  1007. if c.ctx_ != nil {
  1008. return ctxhttp.Do(c.ctx_, c.s.client, req)
  1009. }
  1010. return c.s.client.Do(req)
  1011. }
  1012. // Do executes the "oauth2.userinfo.v2.me.get" call.
  1013. // Exactly one of *Userinfoplus or error will be non-nil. Any non-2xx
  1014. // status code is an error. Response headers are in either
  1015. // *Userinfoplus.ServerResponse.Header or (if a response was returned at
  1016. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  1017. // to check whether the returned error was because
  1018. // http.StatusNotModified was returned.
  1019. func (c *UserinfoV2MeGetCall) Do(opts ...googleapi.CallOption) (*Userinfoplus, error) {
  1020. gensupport.SetOptions(c.urlParams_, opts...)
  1021. res, err := c.doRequest("json")
  1022. if res != nil && res.StatusCode == http.StatusNotModified {
  1023. if res.Body != nil {
  1024. res.Body.Close()
  1025. }
  1026. return nil, &googleapi.Error{
  1027. Code: res.StatusCode,
  1028. Header: res.Header,
  1029. }
  1030. }
  1031. if err != nil {
  1032. return nil, err
  1033. }
  1034. defer googleapi.CloseBody(res)
  1035. if err := googleapi.CheckResponse(res); err != nil {
  1036. return nil, err
  1037. }
  1038. ret := &Userinfoplus{
  1039. ServerResponse: googleapi.ServerResponse{
  1040. Header: res.Header,
  1041. HTTPStatusCode: res.StatusCode,
  1042. },
  1043. }
  1044. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  1045. return nil, err
  1046. }
  1047. return ret, nil
  1048. // {
  1049. // "description": "Get user info",
  1050. // "httpMethod": "GET",
  1051. // "id": "oauth2.userinfo.v2.me.get",
  1052. // "path": "userinfo/v2/me",
  1053. // "response": {
  1054. // "$ref": "Userinfoplus"
  1055. // },
  1056. // "scopes": [
  1057. // "https://www.googleapis.com/auth/plus.login",
  1058. // "https://www.googleapis.com/auth/plus.me",
  1059. // "https://www.googleapis.com/auth/userinfo.email",
  1060. // "https://www.googleapis.com/auth/userinfo.profile"
  1061. // ]
  1062. // }
  1063. }