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
93 94 95 |
# File 'lib/auth0/prompts/client.rb', line 93 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.
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/auth0/prompts/client.rb', line 28 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) 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
98 99 100 |
# File 'lib/auth0/prompts/client.rb', line 98 def partials @partials ||= Auth0::Prompts::Partials::Client.new(client: @client) end |
#rendering ⇒ Auth0::Rendering::Client
88 89 90 |
# File 'lib/auth0/prompts/client.rb', line 88 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.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/auth0/prompts/client.rb', line 64 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) 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 |