Class: ActionAuth::Configuration
- Inherits:
-
Object
- Object
- ActionAuth::Configuration
- Defined in:
- lib/action_auth/configuration.rb
Instance Attribute Summary collapse
-
#allow_user_deletion ⇒ Object
Returns the value of attribute allow_user_deletion.
-
#default_from_email ⇒ Object
Returns the value of attribute default_from_email.
-
#magic_link_enabled ⇒ Object
Returns the value of attribute magic_link_enabled.
-
#passkey_only ⇒ Object
Returns the value of attribute passkey_only.
-
#pwned_enabled ⇒ Object
Returns the value of attribute pwned_enabled.
-
#sms_auth_enabled ⇒ Object
Returns the value of attribute sms_auth_enabled.
-
#sms_send_class ⇒ Object
Returns the value of attribute sms_send_class.
-
#verify_email_on_sign_in ⇒ Object
Returns the value of attribute verify_email_on_sign_in.
-
#webauthn_enabled ⇒ Object
Returns the value of attribute webauthn_enabled.
-
#webauthn_origin ⇒ Object
Returns the value of attribute webauthn_origin.
-
#webauthn_rp_name ⇒ Object
Returns the value of attribute webauthn_rp_name.
Instance Method Summary collapse
- #allow_user_deletion? ⇒ Boolean
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #magic_link_enabled? ⇒ Boolean
- #passkey_only? ⇒ Boolean
- #pwned_enabled? ⇒ Boolean
- #sms_auth_enabled? ⇒ Boolean
- #webauthn_enabled? ⇒ Boolean
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/action_auth/configuration.rb', line 17 def initialize @allow_user_deletion = true @default_from_email = "[email protected]" @magic_link_enabled = true @passkey_only = true @pwned_enabled = defined?(Pwned) @sms_auth_enabled = false @sms_send_class = nil @verify_email_on_sign_in = true @webauthn_enabled = defined?(WebAuthn) @webauthn_origin = "http://localhost:3000" @webauthn_rp_name = Rails.application.class.to_s.deconstantize end |
Instance Attribute Details
#allow_user_deletion ⇒ Object
Returns the value of attribute allow_user_deletion.
4 5 6 |
# File 'lib/action_auth/configuration.rb', line 4 def allow_user_deletion @allow_user_deletion end |
#default_from_email ⇒ Object
Returns the value of attribute default_from_email.
5 6 7 |
# File 'lib/action_auth/configuration.rb', line 5 def default_from_email @default_from_email end |
#magic_link_enabled ⇒ Object
Returns the value of attribute magic_link_enabled.
6 7 8 |
# File 'lib/action_auth/configuration.rb', line 6 def magic_link_enabled @magic_link_enabled end |
#passkey_only ⇒ Object
Returns the value of attribute passkey_only.
7 8 9 |
# File 'lib/action_auth/configuration.rb', line 7 def passkey_only @passkey_only end |
#pwned_enabled ⇒ Object
Returns the value of attribute pwned_enabled.
8 9 10 |
# File 'lib/action_auth/configuration.rb', line 8 def pwned_enabled @pwned_enabled end |
#sms_auth_enabled ⇒ Object
Returns the value of attribute sms_auth_enabled.
9 10 11 |
# File 'lib/action_auth/configuration.rb', line 9 def sms_auth_enabled @sms_auth_enabled end |
#sms_send_class ⇒ Object
Returns the value of attribute sms_send_class.
10 11 12 |
# File 'lib/action_auth/configuration.rb', line 10 def sms_send_class @sms_send_class end |
#verify_email_on_sign_in ⇒ Object
Returns the value of attribute verify_email_on_sign_in.
11 12 13 |
# File 'lib/action_auth/configuration.rb', line 11 def verify_email_on_sign_in @verify_email_on_sign_in end |
#webauthn_enabled ⇒ Object
Returns the value of attribute webauthn_enabled.
12 13 14 |
# File 'lib/action_auth/configuration.rb', line 12 def webauthn_enabled @webauthn_enabled end |
#webauthn_origin ⇒ Object
Returns the value of attribute webauthn_origin.
13 14 15 |
# File 'lib/action_auth/configuration.rb', line 13 def webauthn_origin @webauthn_origin end |
#webauthn_rp_name ⇒ Object
Returns the value of attribute webauthn_rp_name.
14 15 16 |
# File 'lib/action_auth/configuration.rb', line 14 def webauthn_rp_name @webauthn_rp_name end |
Instance Method Details
#allow_user_deletion? ⇒ Boolean
31 32 33 |
# File 'lib/action_auth/configuration.rb', line 31 def allow_user_deletion? @allow_user_deletion == true end |
#magic_link_enabled? ⇒ Boolean
35 36 37 |
# File 'lib/action_auth/configuration.rb', line 35 def magic_link_enabled? @magic_link_enabled == true end |
#passkey_only? ⇒ Boolean
43 44 45 |
# File 'lib/action_auth/configuration.rb', line 43 def passkey_only? webauthn_enabled? && @passkey_only == true end |
#pwned_enabled? ⇒ Boolean
51 52 53 |
# File 'lib/action_auth/configuration.rb', line 51 def pwned_enabled? @pwned_enabled.respond_to?(:call) ? @pwned_enabled.call : @pwned_enabled end |
#sms_auth_enabled? ⇒ Boolean
39 40 41 |
# File 'lib/action_auth/configuration.rb', line 39 def sms_auth_enabled? @sms_auth_enabled == true end |
#webauthn_enabled? ⇒ Boolean
47 48 49 |
# File 'lib/action_auth/configuration.rb', line 47 def webauthn_enabled? @webauthn_enabled.respond_to?(:call) ? @webauthn_enabled.call : @webauthn_enabled end |