Method: Google::Auth::ClientId#initialize

Defined in:
lib/googleauth/client_id.rb

#initialize(id, secret) ⇒ ClientId

Note:

Direct instantiation is discouraged to avoid embedding IDs and secrets in source. See #from_file to load from client_secrets.json files.

Initialize the Client ID. Both id and secret must be non-nil.

Parameters:

  • id (String)

    Text identifier of the client ID

  • secret (String)

    Secret associated with the client ID

Raises:



68
69
70
71
72
73
# File 'lib/googleauth/client_id.rb', line 68

def initialize id, secret
  raise InitializationError, "Client id can not be nil" if id.nil?
  raise InitializationError, "Client secret can not be nil" if secret.nil?
  @id = id
  @secret = secret
end