@googleapis/sts 3.2.0 → 3.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.3.1](https://github.com/googleapis/google-api-nodejs-client/compare/sts-v3.3.0...sts-v3.3.1) (2023-08-09)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **sts:** update the API ([5765d2a](https://github.com/googleapis/google-api-nodejs-client/commit/5765d2a4a1966c4a67eae4ccaf7ad094aeee0fb6))
9
+
10
+ ## [3.3.0](https://github.com/googleapis/google-api-nodejs-client/compare/sts-v3.2.0...sts-v3.3.0) (2023-02-24)
11
+
12
+
13
+ ### Features
14
+
15
+ * **sts:** update the API ([b6e069b](https://github.com/googleapis/google-api-nodejs-client/commit/b6e069bd1a5618685f949d97606feeb0204aa8fb))
16
+ * **sts:** update the API ([6329c89](https://github.com/googleapis/google-api-nodejs-client/commit/6329c89747d9e6e8a31804cac232ba231e5ce56b))
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * **sts:** update the API ([df55772](https://github.com/googleapis/google-api-nodejs-client/commit/df5577227f9833b53c24dc9e03b08553a91f20da))
22
+
3
23
  ## [3.2.0](https://github.com/googleapis/google-api-nodejs-client/compare/sts-v3.1.0...sts-v3.2.0) (2023-02-10)
4
24
 
5
25
 
package/build/v1.d.ts CHANGED
@@ -366,61 +366,6 @@ export declare namespace sts_v1 {
366
366
  constructor(context: APIRequestContext);
367
367
  /**
368
368
  * Gets information about a Google OAuth 2.0 access token issued by the Google Cloud [Security Token Service API](https://cloud.google.com/iam/docs/reference/sts/rest).
369
- * @example
370
- * ```js
371
- * // Before running the sample:
372
- * // - Enable the API at:
373
- * // https://console.developers.google.com/apis/api/sts.googleapis.com
374
- * // - Login into gcloud by running:
375
- * // `$ gcloud auth application-default login`
376
- * // - Install the npm module by running:
377
- * // `$ npm install googleapis`
378
- *
379
- * const {google} = require('googleapis');
380
- * const sts = google.sts('v1');
381
- *
382
- * async function main() {
383
- * const auth = new google.auth.GoogleAuth({
384
- * // Scopes can be specified either as an array or as a single, space-delimited string.
385
- * scopes: [],
386
- * });
387
- *
388
- * // Acquire an auth client, and bind it to all future calls
389
- * const authClient = await auth.getClient();
390
- * google.options({auth: authClient});
391
- *
392
- * // Do the magic
393
- * const res = await sts.introspect({
394
- * // Request body metadata
395
- * requestBody: {
396
- * // request body parameters
397
- * // {
398
- * // "token": "my_token",
399
- * // "tokenTypeHint": "my_tokenTypeHint"
400
- * // }
401
- * },
402
- * });
403
- * console.log(res.data);
404
- *
405
- * // Example response
406
- * // {
407
- * // "active": false,
408
- * // "client_id": "my_client_id",
409
- * // "exp": "my_exp",
410
- * // "iat": "my_iat",
411
- * // "iss": "my_iss",
412
- * // "scope": "my_scope",
413
- * // "sub": "my_sub",
414
- * // "username": "my_username"
415
- * // }
416
- * }
417
- *
418
- * main().catch(e => {
419
- * console.error(e);
420
- * throw e;
421
- * });
422
- *
423
- * ```
424
369
  *
425
370
  * @param params - Parameters for request
426
371
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -435,64 +380,6 @@ export declare namespace sts_v1 {
435
380
  introspect(callback: BodyResponseCallback<Schema$GoogleIdentityStsV1IntrospectTokenResponse>): void;
436
381
  /**
437
382
  * Exchanges a credential that represents the resource owner's authorization for a Google-generated [OAuth 2.0 access token] (https://www.rfc-editor.org/rfc/rfc6749#section-5) or [refreshes an accesstoken] (https://www.rfc-editor.org/rfc/rfc6749#section-6) following [the OAuth 2.0 authorization framework] (https://tools.ietf.org/html/rfc8693) The credential can be one of the following: - An authorization code issued by the workforce identity federation authorization endpoint - A [refresh token](https://www.rfc-editor.org/rfc/rfc6749#section-10.4) issued by this endpoint This endpoint is only meant to be called by the Google Cloud CLI. Also note that this API only accepts the authorization code issued for workforce pools.
438
- * @example
439
- * ```js
440
- * // Before running the sample:
441
- * // - Enable the API at:
442
- * // https://console.developers.google.com/apis/api/sts.googleapis.com
443
- * // - Login into gcloud by running:
444
- * // `$ gcloud auth application-default login`
445
- * // - Install the npm module by running:
446
- * // `$ npm install googleapis`
447
- *
448
- * const {google} = require('googleapis');
449
- * const sts = google.sts('v1');
450
- *
451
- * async function main() {
452
- * const auth = new google.auth.GoogleAuth({
453
- * // Scopes can be specified either as an array or as a single, space-delimited string.
454
- * scopes: [],
455
- * });
456
- *
457
- * // Acquire an auth client, and bind it to all future calls
458
- * const authClient = await auth.getClient();
459
- * google.options({auth: authClient});
460
- *
461
- * // Do the magic
462
- * const res = await sts.oauthtoken({
463
- * // Request body metadata
464
- * requestBody: {
465
- * // request body parameters
466
- * // {
467
- * // "clientId": "my_clientId",
468
- * // "code": "my_code",
469
- * // "codeVerifier": "my_codeVerifier",
470
- * // "grantType": "my_grantType",
471
- * // "redirectUri": "my_redirectUri",
472
- * // "refreshToken": "my_refreshToken",
473
- * // "scope": "my_scope"
474
- * // }
475
- * },
476
- * });
477
- * console.log(res.data);
478
- *
479
- * // Example response
480
- * // {
481
- * // "access_token": "my_access_token",
482
- * // "expires_in": 0,
483
- * // "id_token": "my_id_token",
484
- * // "refresh_token": "my_refresh_token",
485
- * // "scope": "my_scope",
486
- * // "token_type": "my_token_type"
487
- * // }
488
- * }
489
- *
490
- * main().catch(e => {
491
- * console.error(e);
492
- * throw e;
493
- * });
494
- *
495
- * ```
496
383
  *
497
384
  * @param params - Parameters for request
498
385
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -507,62 +394,6 @@ export declare namespace sts_v1 {
507
394
  oauthtoken(callback: BodyResponseCallback<Schema$GoogleIdentityStsV1ExchangeOauthTokenResponse>): void;
508
395
  /**
509
396
  * Exchanges a credential for a Google OAuth 2.0 access token. The token asserts an external identity within an identity pool, or it applies a Credential Access Boundary to a Google access token. Note that workforce pools do not support Credential Access Boundaries. When you call this method, do not send the `Authorization` HTTP header in the request. This method does not require the `Authorization` header, and using the header can cause the request to fail.
510
- * @example
511
- * ```js
512
- * // Before running the sample:
513
- * // - Enable the API at:
514
- * // https://console.developers.google.com/apis/api/sts.googleapis.com
515
- * // - Login into gcloud by running:
516
- * // `$ gcloud auth application-default login`
517
- * // - Install the npm module by running:
518
- * // `$ npm install googleapis`
519
- *
520
- * const {google} = require('googleapis');
521
- * const sts = google.sts('v1');
522
- *
523
- * async function main() {
524
- * const auth = new google.auth.GoogleAuth({
525
- * // Scopes can be specified either as an array or as a single, space-delimited string.
526
- * scopes: [],
527
- * });
528
- *
529
- * // Acquire an auth client, and bind it to all future calls
530
- * const authClient = await auth.getClient();
531
- * google.options({auth: authClient});
532
- *
533
- * // Do the magic
534
- * const res = await sts.token({
535
- * // Request body metadata
536
- * requestBody: {
537
- * // request body parameters
538
- * // {
539
- * // "audience": "my_audience",
540
- * // "grantType": "my_grantType",
541
- * // "options": "my_options",
542
- * // "requestedTokenType": "my_requestedTokenType",
543
- * // "scope": "my_scope",
544
- * // "subjectToken": "my_subjectToken",
545
- * // "subjectTokenType": "my_subjectTokenType"
546
- * // }
547
- * },
548
- * });
549
- * console.log(res.data);
550
- *
551
- * // Example response
552
- * // {
553
- * // "access_token": "my_access_token",
554
- * // "expires_in": 0,
555
- * // "issued_token_type": "my_issued_token_type",
556
- * // "token_type": "my_token_type"
557
- * // }
558
- * }
559
- *
560
- * main().catch(e => {
561
- * console.error(e);
562
- * throw e;
563
- * });
564
- *
565
- * ```
566
397
  *
567
398
  * @param params - Parameters for request
568
399
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
package/build/v1.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"v1.js","sourceRoot":"","sources":["../v1.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,uDA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"}
package/build/v1beta.d.ts CHANGED
@@ -254,62 +254,6 @@ export declare namespace sts_v1beta {
254
254
  constructor(context: APIRequestContext);
255
255
  /**
256
256
  * Exchanges a credential for a Google OAuth 2.0 access token. The token asserts an external identity within a workload identity pool, or it applies a Credential Access Boundary to a Google access token. When you call this method, do not send the `Authorization` HTTP header in the request. This method does not require the `Authorization` header, and using the header can cause the request to fail.
257
- * @example
258
- * ```js
259
- * // Before running the sample:
260
- * // - Enable the API at:
261
- * // https://console.developers.google.com/apis/api/sts.googleapis.com
262
- * // - Login into gcloud by running:
263
- * // `$ gcloud auth application-default login`
264
- * // - Install the npm module by running:
265
- * // `$ npm install googleapis`
266
- *
267
- * const {google} = require('googleapis');
268
- * const sts = google.sts('v1beta');
269
- *
270
- * async function main() {
271
- * const auth = new google.auth.GoogleAuth({
272
- * // Scopes can be specified either as an array or as a single, space-delimited string.
273
- * scopes: [],
274
- * });
275
- *
276
- * // Acquire an auth client, and bind it to all future calls
277
- * const authClient = await auth.getClient();
278
- * google.options({auth: authClient});
279
- *
280
- * // Do the magic
281
- * const res = await sts.token({
282
- * // Request body metadata
283
- * requestBody: {
284
- * // request body parameters
285
- * // {
286
- * // "audience": "my_audience",
287
- * // "grantType": "my_grantType",
288
- * // "options": "my_options",
289
- * // "requestedTokenType": "my_requestedTokenType",
290
- * // "scope": "my_scope",
291
- * // "subjectToken": "my_subjectToken",
292
- * // "subjectTokenType": "my_subjectTokenType"
293
- * // }
294
- * },
295
- * });
296
- * console.log(res.data);
297
- *
298
- * // Example response
299
- * // {
300
- * // "access_token": "my_access_token",
301
- * // "expires_in": 0,
302
- * // "issued_token_type": "my_issued_token_type",
303
- * // "token_type": "my_token_type"
304
- * // }
305
- * }
306
- *
307
- * main().catch(e => {
308
- * console.error(e);
309
- * throw e;
310
- * });
311
- *
312
- * ```
313
257
  *
314
258
  * @param params - Parameters for request
315
259
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1 +1 @@
1
- {"version":3,"file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6 @@
1
1
  {
2
2
  "name": "@googleapis/sts",
3
- "version": "3.2.0",
3
+ "version": "3.3.1",
4
4
  "description": "sts",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
package/v1.ts CHANGED
@@ -423,61 +423,6 @@ export namespace sts_v1 {
423
423
 
424
424
  /**
425
425
  * Gets information about a Google OAuth 2.0 access token issued by the Google Cloud [Security Token Service API](https://cloud.google.com/iam/docs/reference/sts/rest).
426
- * @example
427
- * ```js
428
- * // Before running the sample:
429
- * // - Enable the API at:
430
- * // https://console.developers.google.com/apis/api/sts.googleapis.com
431
- * // - Login into gcloud by running:
432
- * // `$ gcloud auth application-default login`
433
- * // - Install the npm module by running:
434
- * // `$ npm install googleapis`
435
- *
436
- * const {google} = require('googleapis');
437
- * const sts = google.sts('v1');
438
- *
439
- * async function main() {
440
- * const auth = new google.auth.GoogleAuth({
441
- * // Scopes can be specified either as an array or as a single, space-delimited string.
442
- * scopes: [],
443
- * });
444
- *
445
- * // Acquire an auth client, and bind it to all future calls
446
- * const authClient = await auth.getClient();
447
- * google.options({auth: authClient});
448
- *
449
- * // Do the magic
450
- * const res = await sts.introspect({
451
- * // Request body metadata
452
- * requestBody: {
453
- * // request body parameters
454
- * // {
455
- * // "token": "my_token",
456
- * // "tokenTypeHint": "my_tokenTypeHint"
457
- * // }
458
- * },
459
- * });
460
- * console.log(res.data);
461
- *
462
- * // Example response
463
- * // {
464
- * // "active": false,
465
- * // "client_id": "my_client_id",
466
- * // "exp": "my_exp",
467
- * // "iat": "my_iat",
468
- * // "iss": "my_iss",
469
- * // "scope": "my_scope",
470
- * // "sub": "my_sub",
471
- * // "username": "my_username"
472
- * // }
473
- * }
474
- *
475
- * main().catch(e => {
476
- * console.error(e);
477
- * throw e;
478
- * });
479
- *
480
- * ```
481
426
  *
482
427
  * @param params - Parameters for request
483
428
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -570,64 +515,6 @@ export namespace sts_v1 {
570
515
 
571
516
  /**
572
517
  * Exchanges a credential that represents the resource owner's authorization for a Google-generated [OAuth 2.0 access token] (https://www.rfc-editor.org/rfc/rfc6749#section-5) or [refreshes an accesstoken] (https://www.rfc-editor.org/rfc/rfc6749#section-6) following [the OAuth 2.0 authorization framework] (https://tools.ietf.org/html/rfc8693) The credential can be one of the following: - An authorization code issued by the workforce identity federation authorization endpoint - A [refresh token](https://www.rfc-editor.org/rfc/rfc6749#section-10.4) issued by this endpoint This endpoint is only meant to be called by the Google Cloud CLI. Also note that this API only accepts the authorization code issued for workforce pools.
573
- * @example
574
- * ```js
575
- * // Before running the sample:
576
- * // - Enable the API at:
577
- * // https://console.developers.google.com/apis/api/sts.googleapis.com
578
- * // - Login into gcloud by running:
579
- * // `$ gcloud auth application-default login`
580
- * // - Install the npm module by running:
581
- * // `$ npm install googleapis`
582
- *
583
- * const {google} = require('googleapis');
584
- * const sts = google.sts('v1');
585
- *
586
- * async function main() {
587
- * const auth = new google.auth.GoogleAuth({
588
- * // Scopes can be specified either as an array or as a single, space-delimited string.
589
- * scopes: [],
590
- * });
591
- *
592
- * // Acquire an auth client, and bind it to all future calls
593
- * const authClient = await auth.getClient();
594
- * google.options({auth: authClient});
595
- *
596
- * // Do the magic
597
- * const res = await sts.oauthtoken({
598
- * // Request body metadata
599
- * requestBody: {
600
- * // request body parameters
601
- * // {
602
- * // "clientId": "my_clientId",
603
- * // "code": "my_code",
604
- * // "codeVerifier": "my_codeVerifier",
605
- * // "grantType": "my_grantType",
606
- * // "redirectUri": "my_redirectUri",
607
- * // "refreshToken": "my_refreshToken",
608
- * // "scope": "my_scope"
609
- * // }
610
- * },
611
- * });
612
- * console.log(res.data);
613
- *
614
- * // Example response
615
- * // {
616
- * // "access_token": "my_access_token",
617
- * // "expires_in": 0,
618
- * // "id_token": "my_id_token",
619
- * // "refresh_token": "my_refresh_token",
620
- * // "scope": "my_scope",
621
- * // "token_type": "my_token_type"
622
- * // }
623
- * }
624
- *
625
- * main().catch(e => {
626
- * console.error(e);
627
- * throw e;
628
- * });
629
- *
630
- * ```
631
518
  *
632
519
  * @param params - Parameters for request
633
520
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -720,62 +607,6 @@ export namespace sts_v1 {
720
607
 
721
608
  /**
722
609
  * Exchanges a credential for a Google OAuth 2.0 access token. The token asserts an external identity within an identity pool, or it applies a Credential Access Boundary to a Google access token. Note that workforce pools do not support Credential Access Boundaries. When you call this method, do not send the `Authorization` HTTP header in the request. This method does not require the `Authorization` header, and using the header can cause the request to fail.
723
- * @example
724
- * ```js
725
- * // Before running the sample:
726
- * // - Enable the API at:
727
- * // https://console.developers.google.com/apis/api/sts.googleapis.com
728
- * // - Login into gcloud by running:
729
- * // `$ gcloud auth application-default login`
730
- * // - Install the npm module by running:
731
- * // `$ npm install googleapis`
732
- *
733
- * const {google} = require('googleapis');
734
- * const sts = google.sts('v1');
735
- *
736
- * async function main() {
737
- * const auth = new google.auth.GoogleAuth({
738
- * // Scopes can be specified either as an array or as a single, space-delimited string.
739
- * scopes: [],
740
- * });
741
- *
742
- * // Acquire an auth client, and bind it to all future calls
743
- * const authClient = await auth.getClient();
744
- * google.options({auth: authClient});
745
- *
746
- * // Do the magic
747
- * const res = await sts.token({
748
- * // Request body metadata
749
- * requestBody: {
750
- * // request body parameters
751
- * // {
752
- * // "audience": "my_audience",
753
- * // "grantType": "my_grantType",
754
- * // "options": "my_options",
755
- * // "requestedTokenType": "my_requestedTokenType",
756
- * // "scope": "my_scope",
757
- * // "subjectToken": "my_subjectToken",
758
- * // "subjectTokenType": "my_subjectTokenType"
759
- * // }
760
- * },
761
- * });
762
- * console.log(res.data);
763
- *
764
- * // Example response
765
- * // {
766
- * // "access_token": "my_access_token",
767
- * // "expires_in": 0,
768
- * // "issued_token_type": "my_issued_token_type",
769
- * // "token_type": "my_token_type"
770
- * // }
771
- * }
772
- *
773
- * main().catch(e => {
774
- * console.error(e);
775
- * throw e;
776
- * });
777
- *
778
- * ```
779
610
  *
780
611
  * @param params - Parameters for request
781
612
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
package/v1beta.ts CHANGED
@@ -311,62 +311,6 @@ export namespace sts_v1beta {
311
311
 
312
312
  /**
313
313
  * Exchanges a credential for a Google OAuth 2.0 access token. The token asserts an external identity within a workload identity pool, or it applies a Credential Access Boundary to a Google access token. When you call this method, do not send the `Authorization` HTTP header in the request. This method does not require the `Authorization` header, and using the header can cause the request to fail.
314
- * @example
315
- * ```js
316
- * // Before running the sample:
317
- * // - Enable the API at:
318
- * // https://console.developers.google.com/apis/api/sts.googleapis.com
319
- * // - Login into gcloud by running:
320
- * // `$ gcloud auth application-default login`
321
- * // - Install the npm module by running:
322
- * // `$ npm install googleapis`
323
- *
324
- * const {google} = require('googleapis');
325
- * const sts = google.sts('v1beta');
326
- *
327
- * async function main() {
328
- * const auth = new google.auth.GoogleAuth({
329
- * // Scopes can be specified either as an array or as a single, space-delimited string.
330
- * scopes: [],
331
- * });
332
- *
333
- * // Acquire an auth client, and bind it to all future calls
334
- * const authClient = await auth.getClient();
335
- * google.options({auth: authClient});
336
- *
337
- * // Do the magic
338
- * const res = await sts.token({
339
- * // Request body metadata
340
- * requestBody: {
341
- * // request body parameters
342
- * // {
343
- * // "audience": "my_audience",
344
- * // "grantType": "my_grantType",
345
- * // "options": "my_options",
346
- * // "requestedTokenType": "my_requestedTokenType",
347
- * // "scope": "my_scope",
348
- * // "subjectToken": "my_subjectToken",
349
- * // "subjectTokenType": "my_subjectTokenType"
350
- * // }
351
- * },
352
- * });
353
- * console.log(res.data);
354
- *
355
- * // Example response
356
- * // {
357
- * // "access_token": "my_access_token",
358
- * // "expires_in": 0,
359
- * // "issued_token_type": "my_issued_token_type",
360
- * // "token_type": "my_token_type"
361
- * // }
362
- * }
363
- *
364
- * main().catch(e => {
365
- * console.error(e);
366
- * throw e;
367
- * });
368
- *
369
- * ```
370
314
  *
371
315
  * @param params - Parameters for request
372
316
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.