Class: Google::Apis::AgentidentitycredentialsV1::GoogleCloudAgentidentitycredentialsV1Success

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/agentidentitycredentials_v1/classes.rb,
lib/google/apis/agentidentitycredentials_v1/representations.rb,
lib/google/apis/agentidentitycredentials_v1/representations.rb

Overview

Message indicating successful retrieval of credentials.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAgentidentitycredentialsV1Success

Returns a new instance of GoogleCloudAgentidentitycredentialsV1Success.



220
221
222
# File 'lib/google/apis/agentidentitycredentials_v1/classes.rb', line 220

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#expire_timeString

The expiration time of the token. This does not guarantee that the token will be valid until this time, since the token could be revoked earlier. There could also be clock skew between the auth provider and the client so it may expire slightly earlier. If not set, the token might be permanent or it may be that the service does not (or cannot) know when it will expire. Corresponds to the JSON property expireTime

Returns:

  • (String)


194
195
196
# File 'lib/google/apis/agentidentitycredentials_v1/classes.rb', line 194

def expire_time
  @expire_time
end

#headerString

The HTTP header name where the token should be placed. Corresponds to the JSON property header

Returns:

  • (String)


199
200
201
# File 'lib/google/apis/agentidentitycredentials_v1/classes.rb', line 199

def header
  @header
end

#scopesArray<String>

The scopes actually associated with the retrieved token. End users may have rejected some requested scopes, or the third-party authorization servers can return a different set of scopes than what was asked for. Callers should verify that all required scopes for their intended use are included in this list. Corresponds to the JSON property scopes

Returns:

  • (Array<String>)


208
209
210
# File 'lib/google/apis/agentidentitycredentials_v1/classes.rb', line 208

def scopes
  @scopes
end

#tokenString

The retrieved access token or credential for the end user. On MCPTool call, for an invalid token OAuth spec says this should return 401 or 403, but MCPServers may implement this differently. If you get any flavor of PERMISSION_DENIED, retry your original request to RetrieveCredentials with force_refresh_token set to the expired/invalid token string, which will fetch a new token or initiate a new consent flow. Corresponds to the JSON property token

Returns:

  • (String)


218
219
220
# File 'lib/google/apis/agentidentitycredentials_v1/classes.rb', line 218

def token
  @token
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



225
226
227
228
229
230
# File 'lib/google/apis/agentidentitycredentials_v1/classes.rb', line 225

def update!(**args)
  @expire_time = args[:expire_time] if args.key?(:expire_time)
  @header = args[:header] if args.key?(:header)
  @scopes = args[:scopes] if args.key?(:scopes)
  @token = args[:token] if args.key?(:token)
end