class Comet::OidcConfig

OidcConfig is a typed class wrapper around the underlying Comet Server API data structure.

def clear

def clear
  @display_name = ''
  @hosts = []
  @organization_id = ''
  @provider = ''
  @client_id = ''
  @client_secret = ''
  @scopes = []
  @required_claims = []
  @generic_op_discovery_document_url = ''
  @azure_adv2op_tenant_id = ''
  @google_op_hosted_domain = ''
  @unknown_json_fields = {}
end

def from_hash(obj)

Parameters:
  • obj (Hash) -- The complete object as a Ruby hash
def from_hash(obj)
  raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
  obj.each do |k, v|
    case k
    when 'DisplayName'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
      @display_name = v
    when 'Hosts'
      if v.nil?
        @hosts = []
      else
        @hosts = Array.new(v.length)
        v.each_with_index do |v1, i1|
          raise TypeError, "'v1' expected String, got #{v1.class}" unless v1.is_a? String
          @hosts[i1] = v1
        end
      end
    when 'OrganizationID'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
      @organization_id = v
    when 'Provider'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
      @provider = v
    when 'ClientID'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
      @client_id = v
    when 'ClientSecret'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
      @client_secret = v
    when 'SkipMFA'
      @skip_mfa = v
    when 'Scopes'
      if v.nil?
        @scopes = []
      else
        @scopes = Array.new(v.length)
        v.each_with_index do |v1, i1|
          raise TypeError, "'v1' expected String, got #{v1.class}" unless v1.is_a? String
          @scopes[i1] = v1
        end
      end
    when 'RequiredClaims'
      if v.nil?
        @required_claims = []
      else
        @required_claims = Array.new(v.length)
        v.each_with_index do |v1, i1|
          @required_claims[i1] = Comet::OidcClaim.new
          @required_claims[i1].from_hash(v1)
        end
      end
    when 'DiscoveryDocumentURL'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
      @generic_op_discovery_document_url = v
    when 'AzureTenantID'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
      @azure_adv2op_tenant_id = v
    when 'GoogleHostedDomain'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
      @google_op_hosted_domain = v
    else
      @unknown_json_fields[k] = v
    end
  end
end

def from_json(json_string)

Parameters:
  • json_string (String) -- The complete object in JSON format
def from_json(json_string)
  raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
  from_hash(JSON.parse(json_string))
end

def initialize

def initialize
  clear
end

def to_h

Returns:
  • (Hash) - The complete object as a Ruby hash
def to_h
  to_hash
end

def to_hash

Returns:
  • (Hash) - The complete object as a Ruby hash
def to_hash
  ret = {}
  ret['DisplayName'] = @display_name
  unless @hosts.nil?
    ret['Hosts'] = @hosts
  end
  unless @organization_id.nil?
    ret['OrganizationID'] = @organization_id
  end
  ret['Provider'] = @provider
  ret['ClientID'] = @client_id
  ret['ClientSecret'] = @client_secret
  ret['SkipMFA'] = @skip_mfa
  unless @scopes.nil?
    ret['Scopes'] = @scopes
  end
  unless @required_claims.nil?
    ret['RequiredClaims'] = @required_claims
  end
  unless @generic_op_discovery_document_url.nil?
    ret['DiscoveryDocumentURL'] = @generic_op_discovery_document_url
  end
  unless @azure_adv2op_tenant_id.nil?
    ret['AzureTenantID'] = @azure_adv2op_tenant_id
  end
  unless @google_op_hosted_domain.nil?
    ret['GoogleHostedDomain'] = @google_op_hosted_domain
  end
  @unknown_json_fields.each do |k, v|
    ret[k] = v
  end
  ret
end

def to_json(options = {})

Returns:
  • (String) - The complete object as a JSON string
def to_json(options = {})
  to_hash.to_json(options)
end