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

#connection(connection_name) ⇒ Object Also known as: get_connection

Deprecated.
  • 4.14.0, please use Auth0::Api::V2::Connections

-

See Also:

  • https://auth0.com/docs/migrations/guides/management-api-v1-v2

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

def connection(connection_name)
  warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
  path = "/api/connections/#{connection_name}"
  get(path)
end

#connectionsObject Also known as: get_connections

Deprecated.
  • 4.14.0, please use Auth0::Api::V2::Connections

https://auth0.com/docs/api#!#get--api-connections

See Also:

  • https://auth0.com/docs/migrations/guides/management-api-v1-v2

9
10
11
12
# File 'lib/auth0/api/v1/connections.rb', line 9

def connections
  warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
  get('/api/connections')
end

#create_connection(connection_name, strategy, tenant_domain, domain_aliases = nil) ⇒ Object

Deprecated.
  • 4.14.0, please use Auth0::Api::V2::Connections

https://auth0.com/docs/api#!#post--api-connections

See Also:

  • https://auth0.com/docs/migrations/guides/management-api-v1-v2

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

def create_connection(connection_name, strategy, tenant_domain, domain_aliases = nil)
  warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
  path = '/api/connections'
  request_params = {
    name: connection_name,
    strategy: strategy,
    options: {
      tenant_domain: tenant_domain,
      domain_aliases: domain_aliases
    }
  }
  post(path, request_params)
end

#delete_connection(connection_name) ⇒ Object

Deprecated.
  • 4.14.0, please use Auth0::Api::V2::Connections

-

See Also:

  • https://auth0.com/docs/migrations/guides/management-api-v1-v2

28
29
30
31
32
# File 'lib/auth0/api/v1/connections.rb', line 28

def delete_connection(connection_name)
  warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
  path = "/api/connections/#{connection_name}"
  delete(path)
end

#update_connection(connection_name, tenant_domain, status = true) ⇒ Object

Deprecated.
  • 4.14.0, please use Auth0::Api::V2::Connections

-

See Also:

  • https://auth0.com/docs/migrations/guides/management-api-v1-v2

54
55
56
57
58
59
60
61
62
63
64
# File 'lib/auth0/api/v1/connections.rb', line 54

def update_connection(connection_name, tenant_domain, status = true)
  warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
  path = "/api/connections/#{connection_name}"
  request_params = {
    status: status,
    options: {
      tenant_domain: tenant_domain
    }
  }
  put(path, request_params)
end