google-apis-sts_v1 0.12.0 → 0.13.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/google/apis/sts_v1/classes.rb +99 -0
- data/lib/google/apis/sts_v1/gem_version.rb +2 -2
- data/lib/google/apis/sts_v1/representations.rb +34 -0
- data/lib/google/apis/sts_v1/service.rb +32 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a8bc911fdf138ecdb151b531d100bd92c6ff25e20f885adeebc254a1e9af2ce
|
4
|
+
data.tar.gz: cab76b28177bb025806cbe0dd09c4def26a35f126720ebef1d077523a8d7b66d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7435f48776abdb7a0e5ab8d83e5e48fad3c147993160349ca5d8c016000f134a950fbe2cc32d6693b1772620d10c3e42b7d1696edc78f8cf358a9cd3fd6b77d0
|
7
|
+
data.tar.gz: 742f704cc991b016e6e892bf1daa80643cdb765c0069496bdd820f2b5aa8e11c35d1035b077bd446bd962ca84abb5b7a2351b06c4c25964fe5339d4cf9824a36
|
data/CHANGELOG.md
CHANGED
@@ -344,6 +344,105 @@ module Google
|
|
344
344
|
end
|
345
345
|
end
|
346
346
|
|
347
|
+
# Request message for IntrospectToken.
|
348
|
+
class GoogleIdentityStsV1IntrospectTokenRequest
|
349
|
+
include Google::Apis::Core::Hashable
|
350
|
+
|
351
|
+
# Required. The OAuth 2.0 security token issued by the Security Token Service
|
352
|
+
# API.
|
353
|
+
# Corresponds to the JSON property `token`
|
354
|
+
# @return [String]
|
355
|
+
attr_accessor :token
|
356
|
+
|
357
|
+
# Optional. The type of the given token. Supported values are `urn:ietf:params:
|
358
|
+
# oauth:token-type:access_token` and `access_token`.
|
359
|
+
# Corresponds to the JSON property `tokenTypeHint`
|
360
|
+
# @return [String]
|
361
|
+
attr_accessor :token_type_hint
|
362
|
+
|
363
|
+
def initialize(**args)
|
364
|
+
update!(**args)
|
365
|
+
end
|
366
|
+
|
367
|
+
# Update properties of this object
|
368
|
+
def update!(**args)
|
369
|
+
@token = args[:token] if args.key?(:token)
|
370
|
+
@token_type_hint = args[:token_type_hint] if args.key?(:token_type_hint)
|
371
|
+
end
|
372
|
+
end
|
373
|
+
|
374
|
+
# Response message for IntrospectToken.
|
375
|
+
class GoogleIdentityStsV1IntrospectTokenResponse
|
376
|
+
include Google::Apis::Core::Hashable
|
377
|
+
|
378
|
+
# A boolean value that indicates whether the provided access token is currently
|
379
|
+
# active.
|
380
|
+
# Corresponds to the JSON property `active`
|
381
|
+
# @return [Boolean]
|
382
|
+
attr_accessor :active
|
383
|
+
alias_method :active?, :active
|
384
|
+
|
385
|
+
# The client identifier for the OAuth 2.0 client that requested the provided
|
386
|
+
# token.
|
387
|
+
# Corresponds to the JSON property `client_id`
|
388
|
+
# @return [String]
|
389
|
+
attr_accessor :client_id
|
390
|
+
|
391
|
+
# The expiration timestamp, measured in the number of seconds since January 1
|
392
|
+
# 1970 UTC, indicating when this token will expire.
|
393
|
+
# Corresponds to the JSON property `exp`
|
394
|
+
# @return [Fixnum]
|
395
|
+
attr_accessor :exp
|
396
|
+
|
397
|
+
# The issued timestamp, measured in the number of seconds since January 1 1970
|
398
|
+
# UTC, indicating when this token was originally issued.
|
399
|
+
# Corresponds to the JSON property `iat`
|
400
|
+
# @return [Fixnum]
|
401
|
+
attr_accessor :iat
|
402
|
+
|
403
|
+
# The issuer of the provided token.
|
404
|
+
# Corresponds to the JSON property `iss`
|
405
|
+
# @return [String]
|
406
|
+
attr_accessor :iss
|
407
|
+
|
408
|
+
# A list of scopes associated with the provided token.
|
409
|
+
# Corresponds to the JSON property `scope`
|
410
|
+
# @return [String]
|
411
|
+
attr_accessor :scope
|
412
|
+
|
413
|
+
# The unique user ID associated with the provided token. For Google Accounts,
|
414
|
+
# this value is based on the Google Account's user ID. For federated identities,
|
415
|
+
# this value is based on the identity pool ID and the value of the mapped `
|
416
|
+
# google.subject` attribute.
|
417
|
+
# Corresponds to the JSON property `sub`
|
418
|
+
# @return [String]
|
419
|
+
attr_accessor :sub
|
420
|
+
|
421
|
+
# The human-readable identifier for the token principal subject. For example, if
|
422
|
+
# the provided token is associated with a workload identity pool, this field
|
423
|
+
# contains a value in the following format: `principal://iam.googleapis.com/
|
424
|
+
# projects//locations/global/workloadIdentityPools//subject/`
|
425
|
+
# Corresponds to the JSON property `username`
|
426
|
+
# @return [String]
|
427
|
+
attr_accessor :username
|
428
|
+
|
429
|
+
def initialize(**args)
|
430
|
+
update!(**args)
|
431
|
+
end
|
432
|
+
|
433
|
+
# Update properties of this object
|
434
|
+
def update!(**args)
|
435
|
+
@active = args[:active] if args.key?(:active)
|
436
|
+
@client_id = args[:client_id] if args.key?(:client_id)
|
437
|
+
@exp = args[:exp] if args.key?(:exp)
|
438
|
+
@iat = args[:iat] if args.key?(:iat)
|
439
|
+
@iss = args[:iss] if args.key?(:iss)
|
440
|
+
@scope = args[:scope] if args.key?(:scope)
|
441
|
+
@sub = args[:sub] if args.key?(:sub)
|
442
|
+
@username = args[:username] if args.key?(:username)
|
443
|
+
end
|
444
|
+
end
|
445
|
+
|
347
446
|
# An `Options` object configures features that the Security Token Service
|
348
447
|
# supports, but that are not supported by standard OAuth 2.0 token exchange
|
349
448
|
# endpoints, as defined in https://tools.ietf.org/html/rfc8693.
|
@@ -16,13 +16,13 @@ module Google
|
|
16
16
|
module Apis
|
17
17
|
module StsV1
|
18
18
|
# Version of the google-apis-sts_v1 gem
|
19
|
-
GEM_VERSION = "0.
|
19
|
+
GEM_VERSION = "0.13.0"
|
20
20
|
|
21
21
|
# Version of the code generator used to generate this client
|
22
22
|
GENERATOR_VERSION = "0.4.0"
|
23
23
|
|
24
24
|
# Revision of the discovery document this client was generated from
|
25
|
-
REVISION = "
|
25
|
+
REVISION = "20210910"
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -52,6 +52,18 @@ module Google
|
|
52
52
|
include Google::Apis::Core::JsonObjectSupport
|
53
53
|
end
|
54
54
|
|
55
|
+
class GoogleIdentityStsV1IntrospectTokenRequest
|
56
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
57
|
+
|
58
|
+
include Google::Apis::Core::JsonObjectSupport
|
59
|
+
end
|
60
|
+
|
61
|
+
class GoogleIdentityStsV1IntrospectTokenResponse
|
62
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
63
|
+
|
64
|
+
include Google::Apis::Core::JsonObjectSupport
|
65
|
+
end
|
66
|
+
|
55
67
|
class GoogleIdentityStsV1Options
|
56
68
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
57
69
|
|
@@ -133,6 +145,28 @@ module Google
|
|
133
145
|
end
|
134
146
|
end
|
135
147
|
|
148
|
+
class GoogleIdentityStsV1IntrospectTokenRequest
|
149
|
+
# @private
|
150
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
151
|
+
property :token, as: 'token'
|
152
|
+
property :token_type_hint, as: 'tokenTypeHint'
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
class GoogleIdentityStsV1IntrospectTokenResponse
|
157
|
+
# @private
|
158
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
159
|
+
property :active, as: 'active'
|
160
|
+
property :client_id, as: 'client_id'
|
161
|
+
property :exp, :numeric_string => true, as: 'exp'
|
162
|
+
property :iat, :numeric_string => true, as: 'iat'
|
163
|
+
property :iss, as: 'iss'
|
164
|
+
property :scope, as: 'scope'
|
165
|
+
property :sub, as: 'sub'
|
166
|
+
property :username, as: 'username'
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
136
170
|
class GoogleIdentityStsV1Options
|
137
171
|
# @private
|
138
172
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -50,6 +50,38 @@ module Google
|
|
50
50
|
@batch_path = 'batch'
|
51
51
|
end
|
52
52
|
|
53
|
+
# Gets information about a Google OAuth 2.0 access token issued by the Google
|
54
|
+
# Cloud [Security Token Service API](https://cloud.google.com/iam/docs/reference/
|
55
|
+
# sts/rest).
|
56
|
+
# @param [Google::Apis::StsV1::GoogleIdentityStsV1IntrospectTokenRequest] google_identity_sts_v1_introspect_token_request_object
|
57
|
+
# @param [String] fields
|
58
|
+
# Selector specifying which fields to include in a partial response.
|
59
|
+
# @param [String] quota_user
|
60
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
61
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
62
|
+
# @param [Google::Apis::RequestOptions] options
|
63
|
+
# Request-specific options
|
64
|
+
#
|
65
|
+
# @yield [result, err] Result & error if block supplied
|
66
|
+
# @yieldparam result [Google::Apis::StsV1::GoogleIdentityStsV1IntrospectTokenResponse] parsed result object
|
67
|
+
# @yieldparam err [StandardError] error object if request failed
|
68
|
+
#
|
69
|
+
# @return [Google::Apis::StsV1::GoogleIdentityStsV1IntrospectTokenResponse]
|
70
|
+
#
|
71
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
72
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
73
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
74
|
+
def introspect(google_identity_sts_v1_introspect_token_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
75
|
+
command = make_simple_command(:post, 'v1/introspect', options)
|
76
|
+
command.request_representation = Google::Apis::StsV1::GoogleIdentityStsV1IntrospectTokenRequest::Representation
|
77
|
+
command.request_object = google_identity_sts_v1_introspect_token_request_object
|
78
|
+
command.response_representation = Google::Apis::StsV1::GoogleIdentityStsV1IntrospectTokenResponse::Representation
|
79
|
+
command.response_class = Google::Apis::StsV1::GoogleIdentityStsV1IntrospectTokenResponse
|
80
|
+
command.query['fields'] = fields unless fields.nil?
|
81
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
82
|
+
execute_or_queue_command(command, &block)
|
83
|
+
end
|
84
|
+
|
53
85
|
# Exchanges a credential for a Google OAuth 2.0 access token. The token asserts
|
54
86
|
# an external identity within a workload identity pool, or it applies a
|
55
87
|
# Credential Access Boundary to a Google access token. When you call this method,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-apis-sts_v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-09-
|
11
|
+
date: 2021-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-apis-core
|
@@ -58,7 +58,7 @@ licenses:
|
|
58
58
|
metadata:
|
59
59
|
bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
|
60
60
|
changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-sts_v1/CHANGELOG.md
|
61
|
-
documentation_uri: https://googleapis.dev/ruby/google-apis-sts_v1/v0.
|
61
|
+
documentation_uri: https://googleapis.dev/ruby/google-apis-sts_v1/v0.13.0
|
62
62
|
source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-sts_v1
|
63
63
|
post_install_message:
|
64
64
|
rdoc_options: []
|