Class: Google::Apis::IamV1::OauthClientCredential

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

Overview

Represents an OauthClientCredential. Used to authenticate an OauthClient while accessing Google Cloud resources on behalf of a user by using OAuth 2.0 Protocol.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ OauthClientCredential

Returns a new instance of OauthClientCredential.



1465
1466
1467
# File 'lib/google/apis/iam_v1/classes.rb', line 1465

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

Instance Attribute Details

#client_secretString

Output only. The system-generated OAuth client secret. The client secret must be stored securely. If the client secret is leaked, you must delete and re- create the client credential. To learn more, see OAuth client and credential security risks and mitigations Corresponds to the JSON property clientSecret

Returns:

  • (String)


1443
1444
1445
# File 'lib/google/apis/iam_v1/classes.rb', line 1443

def client_secret
  @client_secret
end

#disabledBoolean Also known as: disabled?

Optional. Whether the OauthClientCredential is disabled. You cannot use a disabled OauthClientCredential. Corresponds to the JSON property disabled

Returns:

  • (Boolean)


1449
1450
1451
# File 'lib/google/apis/iam_v1/classes.rb', line 1449

def disabled
  @disabled
end

#display_nameString

Optional. A user-specified display name of the OauthClientCredential. Cannot exceed 32 characters. Corresponds to the JSON property displayName

Returns:

  • (String)


1456
1457
1458
# File 'lib/google/apis/iam_v1/classes.rb', line 1456

def display_name
  @display_name
end

#nameString

Immutable. The resource name of the OauthClientCredential. Format: projects/ project/locations/location/oauthClients/oauth_client/credentials/ credential` Corresponds to the JSON propertyname`

Returns:

  • (String)


1463
1464
1465
# File 'lib/google/apis/iam_v1/classes.rb', line 1463

def name
  @name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1470
1471
1472
1473
1474
1475
# File 'lib/google/apis/iam_v1/classes.rb', line 1470

def update!(**args)
  @client_secret = args[:client_secret] if args.key?(:client_secret)
  @disabled = args[:disabled] if args.key?(:disabled)
  @display_name = args[:display_name] if args.key?(:display_name)
  @name = args[:name] if args.key?(:name)
end