Module: Auth0::Api::V1::Connections

Included in:
Auth0::Api::V1
Defined in:
lib/auth0/api/v1/connections.rb

Overview

Instance Method Summary (collapse)

Instance Method Details

- (Object) connection(connection_name) Also known as: get_connection



13
14
15
16
# File 'lib/auth0/api/v1/connections.rb', line 13

def connection(connection_name)
  path = "/api/connections/#{connection_name.to_s}"
  get(path)
end

- (Object) connections Also known as: get_connections



7
8
9
# File 'lib/auth0/api/v1/connections.rb', line 7

def connections
  get("/api/connections")
end

- (Object) create_connection(connection_name, strategy, tenant_domain, domain_aliases = nil)



26
27
28
29
30
31
32
33
34
35
36
# File 'lib/auth0/api/v1/connections.rb', line 26

def create_connection(connection_name, strategy, tenant_domain, domain_aliases=nil)
  path = "/api/connections"
  request_params = { name: connection_name,
                   strategy: strategy,
                   options: {
                     tenant_domain: tenant_domain,
                     domain_aliases: domain_aliases
                   }
                  }
  post(path, request_params)
end

- (Object) delete_connection(connection_name)



20
21
22
23
# File 'lib/auth0/api/v1/connections.rb', line 20

def delete_connection(connection_name)
  path = "/api/connections/#{connection_name.to_s}"
  delete(path)
end

- (Object) update_connection(connection_name, tenant_domain, status = true)



39
40
41
42
43
44
45
46
47
# File 'lib/auth0/api/v1/connections.rb', line 39

def update_connection(connection_name, tenant_domain, status=true)
  path = "/api/connections/#{connection_name}"
  request_params = {  status: status,
                    options: {
                      tenant_domain: tenant_domain
                    }
                  }
  put(path, request_params)
end