Module: Booth::Userland
- Defined in:
- lib/booth/userland.rb,
lib/booth/userland/logins/new.rb,
lib/booth/userland/remotes/show.rb,
lib/booth/userland/webauths/new.rb,
lib/booth/userland/logins/create.rb,
lib/booth/userland/sessions/show.rb,
lib/booth/userland/webauths/sudo.rb,
lib/booth/userland/logins/destroy.rb,
lib/booth/userland/remotes/update.rb,
lib/booth/userland/sessions/index.rb,
lib/booth/userland/webauths/index.rb,
lib/booth/userland/webauths/create.rb,
lib/booth/userland/onboardings/show.rb,
lib/booth/userland/webauths/destroy.rb,
lib/booth/userland/registrations/new.rb,
lib/booth/userland/onboardings/update.rb,
lib/booth/userland/registrations/create.rb,
lib/booth/userland/webauths/guards/sudo.rb,
lib/booth/userland/extract_flash_messages.rb,
lib/booth/userland/sessions/destroy_one_or_other.rb,
lib/booth/userland/logins/transitions/new/fallible.rb,
lib/booth/userland/logins/transitions/new/timed_out.rb,
lib/booth/userland/webauths/transitions/create/reset.rb,
lib/booth/userland/logins/transitions/create/skip_remotes.rb,
lib/booth/userland/sessions/transitions/show/enter_webauth.rb,
lib/booth/userland/logins/transitions/new/already_logged_in.rb,
lib/booth/userland/logins/transitions/create/choose_username.rb,
lib/booth/userland/logins/transitions/new/no_username_chosen.rb,
lib/booth/userland/sessions/transitions/destroy/enter_webauth.rb,
lib/booth/userland/webauths/transitions/create/choose_nickname.rb,
lib/booth/userland/logins/transitions/new/missing_authenticators.rb,
lib/booth/userland/logins/transitions/new/remote_session_available.rb,
lib/booth/userland/logins/transitions/new/mode_username_and_webauth.rb,
lib/booth/userland/webauths/transitions/create/registration_initiation.rb,
lib/booth/userland/webauths/transitions/sudo/authentication_initiation.rb,
lib/booth/userland/webauths/transitions/create/authentication_initiation.rb,
lib/booth/userland/webauths/transitions/create/registration_verification.rb,
lib/booth/userland/webauths/transitions/sudo/authentication_verification.rb,
lib/booth/userland/webauths/transitions/create/authentication_verification.rb,
lib/booth/userland/logins/transitions/create/webauth_authentication_initiation.rb,
lib/booth/userland/logins/transitions/create/webauth_authentication_verification.rb,
lib/booth/userland/sessions/transitions/destroy/webauth_authentication_initiation.rb,
lib/booth/userland/sessions/transitions/destroy/webauth_authentication_verification.rb
Overview
This module handles user credentials and sessions. Use the class methods defined on this module in your Controllers.
“Userland” indicates, that it is safe to expose these actions to the public. There are no administrative functions here (such as manually creating a new user would be). Those administrative things you would find in the “Adminland” namespace.
Defined Under Namespace
Modules: Logins, Onboardings, Registrations, Remotes, Sessions, Webauths Classes: ExtractFlashMessages
Class Method Summary collapse
-
.create_login ⇒ Object
Handle submitted login form data.
- .create_registration ⇒ Object
-
.create_webauth ⇒ Object
Receive form data and create the Passkey.
- .destroy_all_other_sessions ⇒ Object
-
.destroy_login ⇒ Object
Logout a user.
- .destroy_session ⇒ Object
-
.destroy_webauth ⇒ Object
Remove a user’s configured Passkey.
-
.extract_flash_messages ⇒ Object
————— General Helpers —————.
-
.index_sessions ⇒ Object
————— Session Actions —————.
-
.index_webauth ⇒ Object
List a user’s currently configured Passkeys.
-
.new_login ⇒ Object
Show a login form.
-
.new_registration ⇒ Object
——————– Registration Actions ——————–.
-
.new_webauth ⇒ Object
Show a form to add a Passkey.
- .other_sessions? ⇒ Boolean
- .routes ⇒ Object
-
.show_onboarding ⇒ Object
————– Onboarding Actions ————–.
-
.show_remote_login ⇒ Object
Show a code to the user for logging in somewhere else.
- .show_session ⇒ Object
-
.sudo_webauth ⇒ Object
Re-checks a user’s Passkey for (temporarily elevated) authentication.
- .update_onboarding ⇒ Object
-
.update_remote_login ⇒ Object
Receives the entered code for logging in a remote.
Class Method Details
.create_login ⇒ Object
Handle submitted login form data.
38 39 40 |
# File 'lib/booth/userland.rb', line 38 def self.create_login(...) ::Booth::Userland::Logins::Create.call(...) end |
.create_registration ⇒ Object
24 25 26 |
# File 'lib/booth/userland.rb', line 24 def self.create_registration(...) ::Booth::Userland::Registrations::Create.call(...) end |
.create_webauth ⇒ Object
Receive form data and create the Passkey.
68 69 70 |
# File 'lib/booth/userland.rb', line 68 def self.create_webauth(...) ::Booth::Userland::Webauths::Create.call(...) end |
.destroy_all_other_sessions ⇒ Object
124 125 126 |
# File 'lib/booth/userland.rb', line 124 def self.destroy_all_other_sessions(...) ::Booth::Userland::Sessions::DestroyOneOrOther.call(...) end |
.destroy_login ⇒ Object
Logout a user.
43 44 45 |
# File 'lib/booth/userland.rb', line 43 def self.destroy_login(...) ::Booth::Userland::Logins::Destroy.call(...) end |
.destroy_session ⇒ Object
120 121 122 |
# File 'lib/booth/userland.rb', line 120 def self.destroy_session(...) ::Booth::Userland::Sessions::DestroyOneOrOther.call(...) end |
.destroy_webauth ⇒ Object
Remove a user’s configured Passkey.
73 74 75 |
# File 'lib/booth/userland.rb', line 73 def self.destroy_webauth(...) ::Booth::Userland::Webauths::Destroy.call(...) end |
.extract_flash_messages ⇒ Object
General Helpers
132 133 134 |
# File 'lib/booth/userland.rb', line 132 def self.(...) ::Booth::Userland::ExtractFlashMessages.call(...) end |
.index_sessions ⇒ Object
Session Actions
108 109 110 |
# File 'lib/booth/userland.rb', line 108 def self.index_sessions(...) ::Booth::Userland::Sessions::Index.call(...) end |
.index_webauth ⇒ Object
List a user’s currently configured Passkeys.
52 53 54 |
# File 'lib/booth/userland.rb', line 52 def self.index_webauth(...) ::Booth::Userland::Webauths::Index.call(...) end |
.new_login ⇒ Object
Show a login form.
33 34 35 |
# File 'lib/booth/userland.rb', line 33 def self.new_login(...) ::Booth::Userland::Logins::New.call(...) end |
.new_registration ⇒ Object
Registration Actions
20 21 22 |
# File 'lib/booth/userland.rb', line 20 def self.new_registration(...) ::Booth::Userland::Registrations::New.call(...) end |
.new_webauth ⇒ Object
Show a form to add a Passkey.
63 64 65 |
# File 'lib/booth/userland.rb', line 63 def self.new_webauth(...) ::Booth::Userland::Webauths::New.call(...) end |
.other_sessions? ⇒ Boolean
112 113 114 |
# File 'lib/booth/userland.rb', line 112 def self.other_sessions?(...) index_sessions(...).reject(&:is_current).any? end |
.routes ⇒ Object
12 13 14 |
# File 'lib/booth/userland.rb', line 12 def self.routes(...) ::Booth::Routes::Userland.call(...) end |
.show_onboarding ⇒ Object
Onboarding Actions
81 82 83 |
# File 'lib/booth/userland.rb', line 81 def self.show_onboarding(...) ::Booth::Userland::Onboardings::Show.call(...) end |
.show_remote_login ⇒ Object
Show a code to the user for logging in somewhere else. Specifically, shows the code and the form to enter the manually type in the code.
95 96 97 |
# File 'lib/booth/userland.rb', line 95 def self.show_remote_login(...) ::Booth::Userland::Remotes::Show.call(...) end |
.show_session ⇒ Object
116 117 118 |
# File 'lib/booth/userland.rb', line 116 def self.show_session(...) ::Booth::Userland::Sessions::Show.call(...) end |
.sudo_webauth ⇒ Object
Re-checks a user’s Passkey for (temporarily elevated) authentication. I.e. proof that a user knows his Passkey, before allowing to change it.
58 59 60 |
# File 'lib/booth/userland.rb', line 58 def self.sudo_webauth(...) ::Booth::Userland::Webauths::Sudo.call(...) end |
.update_onboarding ⇒ Object
85 86 87 |
# File 'lib/booth/userland.rb', line 85 def self.update_onboarding(...) ::Booth::Userland::Onboardings::Update.call(...) end |