Class: Auth0::Prompts::Client
- Inherits:
-
Object
- Object
- Auth0::Prompts::Client
- Defined in:
- lib/auth0/prompts/client.rb
Instance Method Summary collapse
- #custom_text ⇒ Auth0::CustomText::Client
-
#get_settings(request_options: {}, **_params) ⇒ Auth0::Types::GetSettingsResponseContent
Retrieve details of the Universal Login configuration of your tenant.
- #initialize(client:) ⇒ void constructor
- #partials ⇒ Auth0::Partials::Client
- #rendering ⇒ Auth0::Rendering::Client
-
#update_settings(request_options: {}, **params) ⇒ Auth0::Types::UpdateSettingsResponseContent
Update the Universal Login configuration of your tenant.
Constructor Details
#initialize(client:) ⇒ void
9 10 11 |
# File 'lib/auth0/prompts/client.rb', line 9 def initialize(client:) @client = client end |
Instance Method Details
#custom_text ⇒ Auth0::CustomText::Client
99 100 101 |
# File 'lib/auth0/prompts/client.rb', line 99 def custom_text @custom_text ||= Auth0::Prompts::CustomText::Client.new(client: @client) end |
#get_settings(request_options: {}, **_params) ⇒ Auth0::Types::GetSettingsResponseContent
Retrieve details of the Universal Login configuration of your tenant. This includes the Identifier First Authentication and WebAuthn with Device Biometrics for MFA features.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/auth0/prompts/client.rb', line 31 def get_settings(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( base_url: [:base_url], method: "GET", path: "prompts", request_options: ) begin response = @client.send(request) rescue Net::HTTPRequestTimeout raise Auth0::Errors::TimeoutError end code = response.code.to_i if code.between?(200, 299) (response.body.to_s.empty? ? nil : Auth0::Types::GetSettingsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) end end |
#partials ⇒ Auth0::Partials::Client
104 105 106 |
# File 'lib/auth0/prompts/client.rb', line 104 def partials @partials ||= Auth0::Prompts::Partials::Client.new(client: @client) end |
#rendering ⇒ Auth0::Rendering::Client
94 95 96 |
# File 'lib/auth0/prompts/client.rb', line 94 def rendering @rendering ||= Auth0::Prompts::Rendering::Client.new(client: @client) end |
#update_settings(request_options: {}, **params) ⇒ Auth0::Types::UpdateSettingsResponseContent
Update the Universal Login configuration of your tenant. This includes the Identifier First Authentication and WebAuthn with Device Biometrics for MFA features.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/auth0/prompts/client.rb', line 70 def update_settings(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) request = Auth0::Internal::JSON::Request.new( base_url: [:base_url], method: "PATCH", path: "prompts", body: Auth0::Prompts::Types::UpdateSettingsRequestContent.new(params).to_h, request_options: ) begin response = @client.send(request) rescue Net::HTTPRequestTimeout raise Auth0::Errors::TimeoutError end code = response.code.to_i if code.between?(200, 299) (response.body.to_s.empty? ? nil : Auth0::Types::UpdateSettingsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) end end |