Class: Xberg::CredentialProviderConfigVertexOauth2

Inherits:
Data
  • Object
show all
Extended by:
T::Sig
Includes:
CredentialProviderConfig
Defined in:
lib/xberg/native.rb

Overview

Google Vertex AI OAuth2 via a service-account JSON key file on disk.

Points at a file path rather than embedding the key inline: the key file contains an RSA private key — stronger secret material than an API key — and LlmConfig must never carry that directly, matching the credential-handling policy the rest of this module follows.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#scopeObject (readonly)

Returns the value of attribute scope

Returns:

  • (Object)

    the current value of scope



926
927
928
# File 'lib/xberg/native.rb', line 926

def scope
  @scope
end

#service_account_key_fileObject (readonly)

Returns the value of attribute service_account_key_file

Returns:

  • (Object)

    the current value of service_account_key_file



926
927
928
# File 'lib/xberg/native.rb', line 926

def 
  @service_account_key_file
end

Class Method Details

.from_hash(hash) ⇒ Object



948
949
950
951
952
953
# File 'lib/xberg/native.rb', line 948

def self.from_hash(hash)
  new(
    service_account_key_file: hash[:service_account_key_file] || hash["service_account_key_file"],
    scope: hash[:scope] || hash["scope"]
  )
end

Instance Method Details

#azure_ad?Boolean

Returns:

  • (Boolean)


938
# File 'lib/xberg/native.rb', line 938

def azure_ad? = false

#bedrock_web_identity?Boolean

Returns:

  • (Boolean)


944
945
946
# File 'lib/xberg/native.rb', line 944

def bedrock_web_identity? = false
# @param hash [Hash] deserialized from the native extension
# @return [self]

#vertex_adc?Boolean

Returns:

  • (Boolean)


942
# File 'lib/xberg/native.rb', line 942

def vertex_adc? = false

#vertex_oauth2?Boolean

Returns:

  • (Boolean)


940
# File 'lib/xberg/native.rb', line 940

def vertex_oauth2? = true