Class: Auth0::Management

Inherits:
Object
  • Object
show all
Defined in:
lib/auth0/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(token:, base_url: nil, timeout: nil, max_retries: nil, headers: nil) ⇒ void

Parameters:

  • token (String)
  • base_url (String, nil) (defaults to: nil)
  • timeout (Float, nil) (defaults to: nil) —

    Request timeout in seconds.

  • max_retries (Integer, nil) (defaults to: nil) —

    Maximum number of request retries.

  • headers (Hash, nil) (defaults to: nil) —

    Additional headers to include in requests.



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/auth0/client.rb', line 12

def initialize(token:, base_url: nil, timeout: nil, max_retries: nil, headers: nil)
  raw_client_opts = {
    base_url: base_url || Auth0::Environment::DEFAULT,
    headers: {
      "X-Fern-Language" => "Ruby",
      Authorization: "Bearer #{token}"
    }.merge(headers || {})
  }
  raw_client_opts[:timeout] = timeout if timeout
  raw_client_opts[:max_retries] = max_retries if max_retries

  @raw_client = Auth0::Internal::Http::RawClient.new(**raw_client_opts)
end

Instance Method Details

#actions ⇒ Auth0::Actions::Client



27
28
29
# File 'lib/auth0/client.rb', line 27

def actions
  @actions ||= Auth0::Actions::Client.new(client: @raw_client)
end

#agents ⇒ Auth0::Agents::Client



32
33
34
# File 'lib/auth0/client.rb', line 32

def agents
  @agents ||= Auth0::Agents::Client.new(client: @raw_client)
end

#anomaly ⇒ Auth0::Anomaly::Client



217
218
219
# File 'lib/auth0/client.rb', line 217

def anomaly
  @anomaly ||= Auth0::Anomaly::Client.new(client: @raw_client)
end

#attack_protection ⇒ Auth0::AttackProtection::Client



222
223
224
# File 'lib/auth0/client.rb', line 222

def attack_protection
  @attack_protection ||= Auth0::AttackProtection::Client.new(client: @raw_client)
end

#branding ⇒ Auth0::Branding::Client



37
38
39
# File 'lib/auth0/client.rb', line 37

def branding
  @branding ||= Auth0::Branding::Client.new(client: @raw_client)
end

#client_grants ⇒ Auth0::ClientGrants::Client



42
43
44
# File 'lib/auth0/client.rb', line 42

def client_grants
  @client_grants ||= Auth0::ClientGrants::Client.new(client: @raw_client)
end

#clients ⇒ Auth0::Clients::Client



47
48
49
# File 'lib/auth0/client.rb', line 47

def clients
  @clients ||= Auth0::Clients::Client.new(client: @raw_client)
end

#connection_profiles ⇒ Auth0::ConnectionProfiles::Client



52
53
54
# File 'lib/auth0/client.rb', line 52

def connection_profiles
  @connection_profiles ||= Auth0::ConnectionProfiles::Client.new(client: @raw_client)
end

#connections ⇒ Auth0::Connections::Client



57
58
59
# File 'lib/auth0/client.rb', line 57

def connections
  @connections ||= Auth0::Connections::Client.new(client: @raw_client)
end

#custom_domains ⇒ Auth0::CustomDomains::Client



62
63
64
# File 'lib/auth0/client.rb', line 62

def custom_domains
  @custom_domains ||= Auth0::CustomDomains::Client.new(client: @raw_client)
end

#device_credentials ⇒ Auth0::DeviceCredentials::Client



67
68
69
# File 'lib/auth0/client.rb', line 67

def device_credentials
  @device_credentials ||= Auth0::DeviceCredentials::Client.new(client: @raw_client)
end

#email_templates ⇒ Auth0::EmailTemplates::Client



72
73
74
# File 'lib/auth0/client.rb', line 72

def email_templates
  @email_templates ||= Auth0::EmailTemplates::Client.new(client: @raw_client)
end

#emails ⇒ Auth0::Emails::Client



227
228
229
# File 'lib/auth0/client.rb', line 227

def emails
  @emails ||= Auth0::Emails::Client.new(client: @raw_client)
end

#event_streams ⇒ Auth0::EventStreams::Client



77
78
79
# File 'lib/auth0/client.rb', line 77

def event_streams
  @event_streams ||= Auth0::EventStreams::Client.new(client: @raw_client)
end

#events ⇒ Auth0::Events::Client



82
83
84
# File 'lib/auth0/client.rb', line 82

def events
  @events ||= Auth0::Events::Client.new(client: @raw_client)
end

#flows ⇒ Auth0::Flows::Client



87
88
89
# File 'lib/auth0/client.rb', line 87

def flows
  @flows ||= Auth0::Flows::Client.new(client: @raw_client)
end

#forms ⇒ Auth0::Forms::Client



92
93
94
# File 'lib/auth0/client.rb', line 92

def forms
  @forms ||= Auth0::Forms::Client.new(client: @raw_client)
end

#groups ⇒ Auth0::Groups::Client



102
103
104
# File 'lib/auth0/client.rb', line 102

def groups
  @groups ||= Auth0::Groups::Client.new(client: @raw_client)
end

#guardian ⇒ Auth0::Guardian::Client



232
233
234
# File 'lib/auth0/client.rb', line 232

def guardian
  @guardian ||= Auth0::Guardian::Client.new(client: @raw_client)
end

#hooks ⇒ Auth0::Hooks::Client



107
108
109
# File 'lib/auth0/client.rb', line 107

def hooks
  @hooks ||= Auth0::Hooks::Client.new(client: @raw_client)
end

#jobs ⇒ Auth0::Jobs::Client

Returns:



112
113
114
# File 'lib/auth0/client.rb', line 112

def jobs
  @jobs ||= Auth0::Jobs::Client.new(client: @raw_client)
end

#keys ⇒ Auth0::Keys::Client

Returns:



237
238
239
# File 'lib/auth0/client.rb', line 237

def keys
  @keys ||= Auth0::Keys::Client.new(client: @raw_client)
end

#log_streams ⇒ Auth0::LogStreams::Client



117
118
119
# File 'lib/auth0/client.rb', line 117

def log_streams
  @log_streams ||= Auth0::LogStreams::Client.new(client: @raw_client)
end

#logs ⇒ Auth0::Logs::Client

Returns:



122
123
124
# File 'lib/auth0/client.rb', line 122

def logs
  @logs ||= Auth0::Logs::Client.new(client: @raw_client)
end

#network_acls ⇒ Auth0::NetworkACLs::Client



127
128
129
# File 'lib/auth0/client.rb', line 127

def network_acls
  @network_acls ||= Auth0::NetworkACLs::Client.new(client: @raw_client)
end

#organizations ⇒ Auth0::Organizations::Client



132
133
134
# File 'lib/auth0/client.rb', line 132

def organizations
  @organizations ||= Auth0::Organizations::Client.new(client: @raw_client)
end

#prompts ⇒ Auth0::Prompts::Client



137
138
139
# File 'lib/auth0/client.rb', line 137

def prompts
  @prompts ||= Auth0::Prompts::Client.new(client: @raw_client)
end

#rate_limit_policies ⇒ Auth0::RateLimitPolicies::Client



142
143
144
# File 'lib/auth0/client.rb', line 142

def rate_limit_policies
  @rate_limit_policies ||= Auth0::RateLimitPolicies::Client.new(client: @raw_client)
end

#refresh_tokens ⇒ Auth0::RefreshTokens::Client



147
148
149
# File 'lib/auth0/client.rb', line 147

def refresh_tokens
  @refresh_tokens ||= Auth0::RefreshTokens::Client.new(client: @raw_client)
end

#resource_servers ⇒ Auth0::ResourceServers::Client



152
153
154
# File 'lib/auth0/client.rb', line 152

def resource_servers
  @resource_servers ||= Auth0::ResourceServers::Client.new(client: @raw_client)
end

#risk_assessments ⇒ Auth0::RiskAssessments::Client



242
243
244
# File 'lib/auth0/client.rb', line 242

def risk_assessments
  @risk_assessments ||= Auth0::RiskAssessments::Client.new(client: @raw_client)
end

#roles ⇒ Auth0::Roles::Client



157
158
159
# File 'lib/auth0/client.rb', line 157

def roles
  @roles ||= Auth0::Roles::Client.new(client: @raw_client)
end

#rules ⇒ Auth0::Rules::Client



162
163
164
# File 'lib/auth0/client.rb', line 162

def rules
  @rules ||= Auth0::Rules::Client.new(client: @raw_client)
end

#rules_configs ⇒ Auth0::RulesConfigs::Client



167
168
169
# File 'lib/auth0/client.rb', line 167

def rules_configs
  @rules_configs ||= Auth0::RulesConfigs::Client.new(client: @raw_client)
end

#self_service_profiles ⇒ Auth0::SelfServiceProfiles::Client



172
173
174
# File 'lib/auth0/client.rb', line 172

def self_service_profiles
  @self_service_profiles ||= Auth0::SelfServiceProfiles::Client.new(client: @raw_client)
end

#sessions ⇒ Auth0::Sessions::Client



177
178
179
# File 'lib/auth0/client.rb', line 177

def sessions
  @sessions ||= Auth0::Sessions::Client.new(client: @raw_client)
end

#stats ⇒ Auth0::Stats::Client



182
183
184
# File 'lib/auth0/client.rb', line 182

def stats
  @stats ||= Auth0::Stats::Client.new(client: @raw_client)
end

#supplemental_signals ⇒ Auth0::SupplementalSignals::Client



187
188
189
# File 'lib/auth0/client.rb', line 187

def supplemental_signals
  @supplemental_signals ||= Auth0::SupplementalSignals::Client.new(client: @raw_client)
end

#tenants ⇒ Auth0::Tenants::Client



247
248
249
# File 'lib/auth0/client.rb', line 247

def tenants
  @tenants ||= Auth0::Tenants::Client.new(client: @raw_client)
end

#tickets ⇒ Auth0::Tickets::Client



192
193
194
# File 'lib/auth0/client.rb', line 192

def tickets
  @tickets ||= Auth0::Tickets::Client.new(client: @raw_client)
end

#token_exchange_profiles ⇒ Auth0::TokenExchangeProfiles::Client



197
198
199
# File 'lib/auth0/client.rb', line 197

def token_exchange_profiles
  @token_exchange_profiles ||= Auth0::TokenExchangeProfiles::Client.new(client: @raw_client)
end

#user_attribute_profiles ⇒ Auth0::UserAttributeProfiles::Client



202
203
204
# File 'lib/auth0/client.rb', line 202

def user_attribute_profiles
  @user_attribute_profiles ||= Auth0::UserAttributeProfiles::Client.new(client: @raw_client)
end

#user_blocks ⇒ Auth0::UserBlocks::Client



207
208
209
# File 'lib/auth0/client.rb', line 207

def user_blocks
  @user_blocks ||= Auth0::UserBlocks::Client.new(client: @raw_client)
end

#user_grants ⇒ Auth0::UserGrants::Client



97
98
99
# File 'lib/auth0/client.rb', line 97

def user_grants
  @user_grants ||= Auth0::UserGrants::Client.new(client: @raw_client)
end

#users ⇒ Auth0::Users::Client



212
213
214
# File 'lib/auth0/client.rb', line 212

def users
  @users ||= Auth0::Users::Client.new(client: @raw_client)
end

#verifiable_credentials ⇒ Auth0::VerifiableCredentials::Client



252
253
254
# File 'lib/auth0/client.rb', line 252

def verifiable_credentials
  @verifiable_credentials ||= Auth0::VerifiableCredentials::Client.new(client: @raw_client)
end