Class: Xberg::CredentialProviderConfigAzureAd

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

Overview

Azure AD OAuth2 client-credentials flow (Azure OpenAI / Azure Cognitive Services).

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#client_idObject (readonly)

Returns the value of attribute client_id

Returns:

  • (Object)

    the current value of client_id



883
884
885
# File 'lib/xberg/native.rb', line 883

def client_id
  @client_id
end

#client_secretObject (readonly)

Returns the value of attribute client_secret

Returns:

  • (Object)

    the current value of client_secret



883
884
885
# File 'lib/xberg/native.rb', line 883

def client_secret
  @client_secret
end

#scopeObject (readonly)

Returns the value of attribute scope

Returns:

  • (Object)

    the current value of scope



883
884
885
# File 'lib/xberg/native.rb', line 883

def scope
  @scope
end

#tenant_idObject (readonly)

Returns the value of attribute tenant_id

Returns:

  • (Object)

    the current value of tenant_id



883
884
885
# File 'lib/xberg/native.rb', line 883

def tenant_id
  @tenant_id
end

Class Method Details

.from_hash(hash) ⇒ Object



911
912
913
914
915
916
917
918
# File 'lib/xberg/native.rb', line 911

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

Instance Method Details

#azure_ad?Boolean

Returns:

  • (Boolean)


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

def azure_ad? = true

#bedrock_web_identity?Boolean

Returns:

  • (Boolean)


907
908
909
# File 'lib/xberg/native.rb', line 907

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

#vertex_adc?Boolean

Returns:

  • (Boolean)


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

def vertex_adc? = false

#vertex_oauth2?Boolean

Returns:

  • (Boolean)


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

def vertex_oauth2? = false