rodauth 2.36.0 → 2.37.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (159) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rodauth/features/base.rb +15 -1
  3. data/lib/rodauth/features/change_login.rb +2 -2
  4. data/lib/rodauth/features/create_account.rb +2 -2
  5. data/lib/rodauth/features/email_auth.rb +1 -1
  6. data/lib/rodauth/features/internal_request.rb +4 -4
  7. data/lib/rodauth/features/json.rb +5 -0
  8. data/lib/rodauth/features/jwt.rb +5 -9
  9. data/lib/rodauth/features/lockout.rb +1 -1
  10. data/lib/rodauth/features/login.rb +1 -1
  11. data/lib/rodauth/features/login_password_requirements_base.rb +13 -0
  12. data/lib/rodauth/features/reset_password.rb +1 -1
  13. data/lib/rodauth/features/two_factor_base.rb +6 -13
  14. data/lib/rodauth/features/verify_account.rb +2 -2
  15. data/lib/rodauth/features/webauthn_autofill.rb +2 -1
  16. data/lib/rodauth/features/webauthn_login.rb +1 -1
  17. data/lib/rodauth/version.rb +1 -1
  18. data/lib/rodauth.rb +6 -2
  19. metadata +3 -258
  20. data/CHANGELOG +0 -521
  21. data/README.rdoc +0 -1555
  22. data/doc/account_expiration.rdoc +0 -41
  23. data/doc/active_sessions.rdoc +0 -56
  24. data/doc/argon2.rdoc +0 -54
  25. data/doc/audit_logging.rdoc +0 -44
  26. data/doc/base.rdoc +0 -123
  27. data/doc/change_login.rdoc +0 -25
  28. data/doc/change_password.rdoc +0 -26
  29. data/doc/change_password_notify.rdoc +0 -14
  30. data/doc/close_account.rdoc +0 -26
  31. data/doc/confirm_password.rdoc +0 -32
  32. data/doc/create_account.rdoc +0 -27
  33. data/doc/disallow_common_passwords.rdoc +0 -17
  34. data/doc/disallow_password_reuse.rdoc +0 -30
  35. data/doc/email_auth.rdoc +0 -55
  36. data/doc/email_base.rdoc +0 -18
  37. data/doc/error_reasons.rdoc +0 -77
  38. data/doc/guides/admin_activation.rdoc +0 -46
  39. data/doc/guides/already_authenticated.rdoc +0 -10
  40. data/doc/guides/alternative_login.rdoc +0 -46
  41. data/doc/guides/change_table_and_column_names.rdoc +0 -19
  42. data/doc/guides/create_account_programmatically.rdoc +0 -38
  43. data/doc/guides/delay_password.rdoc +0 -25
  44. data/doc/guides/email_only.rdoc +0 -16
  45. data/doc/guides/i18n.rdoc +0 -29
  46. data/doc/guides/internals.rdoc +0 -233
  47. data/doc/guides/links.rdoc +0 -12
  48. data/doc/guides/login_return.rdoc +0 -37
  49. data/doc/guides/migrate_password_hash_algorithm.rdoc +0 -15
  50. data/doc/guides/password_column.rdoc +0 -25
  51. data/doc/guides/password_confirmation.rdoc +0 -37
  52. data/doc/guides/password_requirements.rdoc +0 -43
  53. data/doc/guides/paths.rdoc +0 -51
  54. data/doc/guides/query_params.rdoc +0 -9
  55. data/doc/guides/redirects.rdoc +0 -17
  56. data/doc/guides/registration_field.rdoc +0 -68
  57. data/doc/guides/render_confirmation.rdoc +0 -17
  58. data/doc/guides/require_mfa.rdoc +0 -30
  59. data/doc/guides/reset_password_autologin.rdoc +0 -21
  60. data/doc/guides/share_configuration.rdoc +0 -34
  61. data/doc/guides/status_column.rdoc +0 -28
  62. data/doc/guides/totp_or_recovery.rdoc +0 -16
  63. data/doc/http_basic_auth.rdoc +0 -18
  64. data/doc/internal_request.rdoc +0 -539
  65. data/doc/json.rdoc +0 -56
  66. data/doc/jwt.rdoc +0 -52
  67. data/doc/jwt_cors.rdoc +0 -22
  68. data/doc/jwt_refresh.rdoc +0 -58
  69. data/doc/lockout.rdoc +0 -73
  70. data/doc/login.rdoc +0 -39
  71. data/doc/login_password_requirements_base.rdoc +0 -44
  72. data/doc/logout.rdoc +0 -22
  73. data/doc/otp.rdoc +0 -93
  74. data/doc/otp_lockout_email.rdoc +0 -30
  75. data/doc/otp_modify_email.rdoc +0 -19
  76. data/doc/otp_unlock.rdoc +0 -58
  77. data/doc/password_complexity.rdoc +0 -34
  78. data/doc/password_expiration.rdoc +0 -38
  79. data/doc/password_grace_period.rdoc +0 -24
  80. data/doc/password_pepper.rdoc +0 -52
  81. data/doc/path_class_methods.rdoc +0 -10
  82. data/doc/recovery_codes.rdoc +0 -61
  83. data/doc/release_notes/1.0.0.txt +0 -443
  84. data/doc/release_notes/1.1.0.txt +0 -8
  85. data/doc/release_notes/1.10.0.txt +0 -80
  86. data/doc/release_notes/1.11.0.txt +0 -32
  87. data/doc/release_notes/1.12.0.txt +0 -61
  88. data/doc/release_notes/1.13.0.txt +0 -34
  89. data/doc/release_notes/1.14.0.txt +0 -19
  90. data/doc/release_notes/1.15.0.txt +0 -21
  91. data/doc/release_notes/1.16.0.txt +0 -31
  92. data/doc/release_notes/1.17.0.txt +0 -23
  93. data/doc/release_notes/1.18.0.txt +0 -26
  94. data/doc/release_notes/1.19.0.txt +0 -116
  95. data/doc/release_notes/1.2.0.txt +0 -18
  96. data/doc/release_notes/1.20.0.txt +0 -175
  97. data/doc/release_notes/1.21.0.txt +0 -12
  98. data/doc/release_notes/1.22.0.txt +0 -11
  99. data/doc/release_notes/1.23.0.txt +0 -32
  100. data/doc/release_notes/1.3.0.txt +0 -21
  101. data/doc/release_notes/1.4.0.txt +0 -11
  102. data/doc/release_notes/1.5.0.txt +0 -74
  103. data/doc/release_notes/1.6.0.txt +0 -37
  104. data/doc/release_notes/1.7.0.txt +0 -6
  105. data/doc/release_notes/1.8.0.txt +0 -14
  106. data/doc/release_notes/1.9.0.txt +0 -15
  107. data/doc/release_notes/2.0.0.txt +0 -361
  108. data/doc/release_notes/2.1.0.txt +0 -31
  109. data/doc/release_notes/2.10.0.txt +0 -47
  110. data/doc/release_notes/2.11.0.txt +0 -31
  111. data/doc/release_notes/2.12.0.txt +0 -17
  112. data/doc/release_notes/2.13.0.txt +0 -19
  113. data/doc/release_notes/2.14.0.txt +0 -17
  114. data/doc/release_notes/2.15.0.txt +0 -48
  115. data/doc/release_notes/2.16.0.txt +0 -20
  116. data/doc/release_notes/2.17.0.txt +0 -10
  117. data/doc/release_notes/2.18.0.txt +0 -27
  118. data/doc/release_notes/2.19.0.txt +0 -61
  119. data/doc/release_notes/2.2.0.txt +0 -39
  120. data/doc/release_notes/2.20.0.txt +0 -10
  121. data/doc/release_notes/2.21.0.txt +0 -28
  122. data/doc/release_notes/2.22.0.txt +0 -43
  123. data/doc/release_notes/2.23.0.txt +0 -15
  124. data/doc/release_notes/2.24.0.txt +0 -15
  125. data/doc/release_notes/2.25.0.txt +0 -8
  126. data/doc/release_notes/2.26.0.txt +0 -45
  127. data/doc/release_notes/2.27.0.txt +0 -35
  128. data/doc/release_notes/2.28.0.txt +0 -16
  129. data/doc/release_notes/2.29.0.txt +0 -27
  130. data/doc/release_notes/2.3.0.txt +0 -37
  131. data/doc/release_notes/2.30.0.txt +0 -15
  132. data/doc/release_notes/2.31.0.txt +0 -47
  133. data/doc/release_notes/2.32.0.txt +0 -65
  134. data/doc/release_notes/2.33.0.txt +0 -18
  135. data/doc/release_notes/2.34.0.txt +0 -36
  136. data/doc/release_notes/2.35.0.txt +0 -22
  137. data/doc/release_notes/2.36.0.txt +0 -35
  138. data/doc/release_notes/2.4.0.txt +0 -22
  139. data/doc/release_notes/2.5.0.txt +0 -20
  140. data/doc/release_notes/2.6.0.txt +0 -37
  141. data/doc/release_notes/2.7.0.txt +0 -33
  142. data/doc/release_notes/2.8.0.txt +0 -20
  143. data/doc/release_notes/2.9.0.txt +0 -21
  144. data/doc/remember.rdoc +0 -79
  145. data/doc/reset_password.rdoc +0 -66
  146. data/doc/reset_password_notify.rdoc +0 -17
  147. data/doc/session_expiration.rdoc +0 -28
  148. data/doc/single_session.rdoc +0 -37
  149. data/doc/sms_codes.rdoc +0 -138
  150. data/doc/two_factor_base.rdoc +0 -70
  151. data/doc/update_password_hash.rdoc +0 -7
  152. data/doc/verify_account.rdoc +0 -67
  153. data/doc/verify_account_grace_period.rdoc +0 -19
  154. data/doc/verify_login_change.rdoc +0 -59
  155. data/doc/webauthn.rdoc +0 -118
  156. data/doc/webauthn_autofill.rdoc +0 -19
  157. data/doc/webauthn_login.rdoc +0 -16
  158. data/doc/webauthn_modify_email.rdoc +0 -19
  159. data/doc/webauthn_verify_account.rdoc +0 -9
@@ -1,36 +0,0 @@
1
- = New Features
2
-
3
- * A rodauth.current_route method has been added for returning the route
4
- name symbol (if rodauth is currently handling the route). This makes it
5
- simpler to write code that extends Rodauth and works with
6
- applications that use override the default route names.
7
-
8
- * A remove_all_active_sessions_except_for method has been added to the
9
- active_sessions feature, which removes all active sessions for the
10
- current account, except for the session id given.
11
-
12
- * A remove_all_active_sessions_except_current method has been added to
13
- the active_sessions feature, which removes all active sessions for
14
- the current account, except for the current session.
15
-
16
- = Improvements
17
-
18
- * Rodauth now supports overriding webauthn_rp_id in the webauthn
19
- feature.
20
-
21
- * When using the login feature, Rodauth now defaults
22
- require_login_redirect to use the path to the login route, instead
23
- of /login.
24
-
25
- * When setting up multifactor authentication, Rodauth now handles the
26
- case where account has been deleted, instead of raising an exception.
27
-
28
- * When a database connection is not available during startup, Rodauth
29
- now handles that case instead of raising an exception. Note that in
30
- this case, Rodauth cannot automatically setup a conversion of token
31
- ids to integer, since it cannot determine whether the underlying
32
- database column uses an integer type.
33
-
34
- * When using WebAuthn 3+, Rodauth no longer defines singleton methods
35
- to work around limitations in WebAuthn. Instead, it uses public
36
- APIs that were added in WebAuthn 3.
@@ -1,22 +0,0 @@
1
- = New Features
2
-
3
- * A throw_rodauth_error method has been added to make it easier
4
- for external extensions to throw the expected error value without
5
- setting a field error.
6
-
7
- = Improvements
8
-
9
- * If an account is not currently logged in, but Rodauth knows the
10
- related account id, remove_all_active_sessions and related
11
- methods in the active_sessions plugin will now remove sessions
12
- for the related account.
13
-
14
- * When using the internal_request feature and subclasses,
15
- internal_request_configuration blocks in superclasses are now
16
- respected when creating the internal request class for a
17
- subclass. When creating the internal request in the subclass,
18
- this behaves as if all internal_request_configuration blocks
19
- were specified directly in the subclass.
20
-
21
- * An ignored block warning on Ruby 3.4 is now avoided by having
22
- Rodauth.load_dependencies accept a block.
@@ -1,35 +0,0 @@
1
- = New Features
2
-
3
- * An otp_unlock feature has been added, allowing a user to unlock
4
- TOTP authentication with 3 consecutive successful TOTP
5
- authentications. Previously, once TOTP authentication was locked
6
- out, there was no way for the user to unlock it.
7
-
8
- Any unsuccessful TOTP authentication during the unlock process
9
- prevents unlocks attempts for a configurable amount of time (15
10
- minutes by default). By default, this limits brute force attempts
11
- to unlock TOTP authentication to less than 10^2 per day, with the
12
- odds of a successful unlock in each attempt being 1 in 10^18.
13
-
14
- * An otp_lockout_email feature has been added for emailing the user
15
- when their TOTP authentication has been locked out or unlocked, and
16
- when there has been a failed unlock attempt.
17
-
18
- * An otp_modify_email feature has been added for emailing the user
19
- when TOTP authentication has been setup or disabled for their
20
- account.
21
-
22
- * A webauthn_modify_email feature has been added for emailing the
23
- user when a WebAuthn authenticator has been added or removed from
24
- their account.
25
-
26
- * An account_from_id configuration method has been added for loading
27
- the account with the given account id.
28
-
29
- * A strftime_format configuration method has been added for
30
- configuring how Time values are formatted for display to the user.
31
-
32
- = Improvements
33
-
34
- * The internal_request feature now works with Roda's path_rewriter
35
- plugin.
@@ -1,22 +0,0 @@
1
- = New Features
2
-
3
- * A password_pepper feature has been added. This allows you to use a
4
- secret key (called a pepper) to append to passwords before hashing
5
- and hash checking. Using this approach, if an attacker obtains the
6
- password hash, it is unusable for cracking unless they can also
7
- get access to the pepper.
8
-
9
- The password_pepper feature also supports a list of previous peppers
10
- that can be used to implement secret rotation and to support
11
- compatibility with unpeppered passwords.
12
-
13
- Rodauth by default uses database functions for password hash
14
- checking on PostgreSQL, MySQL, and Microsoft SQL Server, which in
15
- general provides more security than a password pepper, but both
16
- approaches can be used simultaneously.
17
-
18
- * A session_key_prefix configuration method has been added for
19
- prefixing the values of all default session keys. This can be
20
- useful if you are using multiple Rodauth configurations in the same
21
- application and want to make sure the session keys for the separate
22
- configurations do not overlap.
@@ -1,20 +0,0 @@
1
- = New Features
2
-
3
- * A login_return_to_requested_location_path configuration method has
4
- been added to the login feature. This controls the path to redirect
5
- to if using login_return_to_requested_location?. By default, this
6
- is the same as the fullpath of the request that required login if
7
- that request was a GET request, and nil if that request was not a
8
- GET request. Previously, the fullpath of that request was used even
9
- if it was not a GET request, which caused problems as browsers use a
10
- GET request for redirects, and it is a bad idea to redirect to a path
11
- that may not handle GET requests.
12
-
13
- * A change_login_needs_verification_notice_flash configuration method
14
- has been added to the verify_login_change feature, for allowing
15
- translations when using the feature and not using the
16
- change_login_notice_flash configuration method.
17
-
18
- = Other Improvements
19
-
20
- * new_password_label is now translatable.
@@ -1,37 +0,0 @@
1
- = New Features
2
-
3
- * An around_rodauth configuration method has been added, which is
4
- called around all Rodauth actions. This configuration method
5
- is passed a block, and is useful for cases where you want to wrap
6
- Rodauth's handling of the request.
7
-
8
- For example, if you had a method named time_block in your Roda scope
9
- that timed block execution and added a response header, you could
10
- time Rodauth actions using something like:
11
-
12
- around_rodauth do |&block|
13
- scope.time_block('Rodauth') do
14
- super(&block)
15
- end
16
- end
17
-
18
- * The allow_refresh_with_expired_jwt_access_token? configuration has
19
- been added to the jwt_refresh feature, allowing refreshing with an
20
- expired but otherwise valid access token. When using this method,
21
- it is required to have an hmac_secret specified, so that Rodauth
22
- can make sure the access token matches the refresh token.
23
-
24
- = Other Improvements
25
-
26
- * The javascript for setting up a WebAuthn token has been fixed to
27
- allow it to work correctly if there is already an existing
28
- WebAuthn token for the account.
29
-
30
- * The rodauth.setup_account_verification method has been promoted to
31
- public API. You can use this method for automatically sending
32
- account verification emails when automatically creating accounts.
33
-
34
- * Rodauth no longer loads the same feature multiple times into a
35
- single configuration. This didn't cause any problems before, but
36
- could result in duplicate entries when looking at the loaded
37
- features.
@@ -1,33 +0,0 @@
1
- = New Features
2
-
3
- * An auto_remove_recovery_codes? configuration method has been added
4
- to the recovery_codes feature. This will automatically remove
5
- recovery codes when the last multifactor authentication type other
6
- than the recovery codes has been removed.
7
-
8
- * The jwt_access_expired_status and expired_jwt_access_token_message
9
- configuration methods have been added to the jwt_refresh feature,
10
- for supporting custom statuses and messages for expired tokens.
11
-
12
- = Other Improvements
13
-
14
- * Rodauth will no longer attempt to require a feature that has
15
- already been required. Related to this is you can now use a
16
- a custom Rodauth feature without a rodauth/features/*.rb file
17
- in the Ruby library path, as long as you load the feature
18
- manually.
19
-
20
- * Rodauth now avoids method redefinition warnings in verbose
21
- warning mode. As Ruby 3 is dropping uninitialized instance
22
- variable warnings, Rodauth will be verbose warning free in
23
- Ruby 3.
24
-
25
- = Backwards Compatibility
26
-
27
- * The default remember cookie path is now set to '/'. This fixes
28
- usage in the case where rodauth is loaded under a subpath of the
29
- application (which is not the default behavior). Unfortunately,
30
- this change can negatively affect cases where multiple rodauth
31
- configurations are used in separate paths on the same domain.
32
- In these cases, you should now use remember_cookie_options and
33
- include a :path option.
@@ -1,20 +0,0 @@
1
- = Improvements
2
-
3
- * HttpOnly is now set by default on the remember cookie, so it is no
4
- longer accessible from Javascript. This is a more secure approach
5
- that makes applications using Rodauth's remember feature less
6
- vulnerable in case they are subject to a separate XSS attack.
7
-
8
- * When using the jwt feature, rodauth.clear_session now clears the
9
- JWT session even when the Roda sessions plugin was in use. In most
10
- cases, the jwt feature is not used with the Roda sessions plugin,
11
- but in cases where the same application serves as both an JSON API
12
- and as a HTML site, it is possible the two may be used together.
13
-
14
- = Backwards Compatibility
15
-
16
- * As the default remember cookie :httponly setting is now set to true,
17
- applications using Rodauth that expected to be able to access the
18
- remember cookie from Javascript will no longer work by default.
19
- In these cases, you should now use remember_cookie_options and
20
- include a :httponly=>false option.
@@ -1,21 +0,0 @@
1
- = New Features
2
-
3
- * A json feature has been extracted from the existing jwt feature.
4
- This feature allows for the same JSON API previously supported
5
- by the JWT feature, but stores the session information in the
6
- Rack session instead of in a separate JWT. This makes it
7
- significantly easier to have certain pages use the JSON API,
8
- and other pages the HTML forms.
9
-
10
- = Other Improvements
11
-
12
- * If the remember cookie is created in an SSL request, the Secure
13
- flag is added by default, so the cookie will not be transmitted
14
- in non-SSL requests.
15
-
16
- = Backwards Compatibility
17
-
18
- * Rodauth configurations that use the remember feature and support
19
- requests over both http and https and want to have the remember
20
- cookie transmitted over both should now include :secure=>false in
21
- remember_cookie_options.
data/doc/remember.rdoc DELETED
@@ -1,79 +0,0 @@
1
- = Documentation for Remember Feature
2
-
3
- The remember feature allows for token-based autologin for users. Calling
4
- +rodauth.remember_login+ for an authenticated session will create a token for
5
- the current account and store it in a cookie. You can then add the following
6
- code to your routing block to automatically login users from that token if the
7
- session has expired:
8
-
9
- rodauth.load_memory
10
-
11
- By default, the remember feature just supports a form that the user can use
12
- to change their remember settings for the current browser. They can either
13
- enable remembering for the browser, forget it for the browser, or disable
14
- it completely so that any remembering for other browsers is removed as well.
15
-
16
- In some cases, you may want to automatically remember users and not require
17
- users to turn it on manually. If you want to automatically remember users
18
- on login:
19
-
20
- after_login do
21
- remember_login
22
- end
23
-
24
- The remember feature records which sessions were autologged in via the
25
- remember cookie. If you have sections where you want to add more security,
26
- you can use the confirm password feature to request password authentication
27
- for sessions autologged in via a remember token:
28
-
29
- rodauth.require_password_authentication
30
-
31
- == Auth Value Methods
32
-
33
- extend_remember_deadline? :: Whether to extend the remember token deadline when the user is autologged in via remember token and every +extend_remember_deadline_period+ seconds while logged in.
34
- extend_remember_deadline_period :: The amount of seconds to wait before extending remember token deadline when +extend_remember_deadline?+ is true (3600 by default).
35
- raw_remember_token_deadline :: A deadline before which to allow a raw remember token to be used. Allows for graceful transition for when +hmac_secret+ is first set.
36
- remember_additional_form_tags :: HTML fragment containing additional form tags to use on the change remember setting form.
37
- remember_button :: The text to use for the change remember settings button.
38
- remember_cookie_key :: The cookie name to use for the remember token.
39
- remember_cookie_options :: Any options to set for the remember cookie. By default, the `:path` cookie option is set to `/` and `:httponly` is set to `true`. Also, `:secure` is set to `true` by default if the current request is an HTTPS request.
40
- remember_deadline_column :: The column name in the +remember_table+ storing the deadline after which the token will be ignored.
41
- remember_deadline_extended_session_key :: The session key set if the remember deadline token is being extended.
42
- remember_deadline_interval :: The amount of time for which to remember accounts, 14 days by default. Only used if +set_deadline_values?+ is true.
43
- remember_disable_label :: The label for disabling remembering.
44
- remember_disable_param_value :: The parameter value for disabling remembering.
45
- remember_error_flash :: The flash error to show if there is an error changing a remember setting.
46
- remember_forget_label :: The label for turning off remembering.
47
- remember_forget_param_value :: The parameter value for turning off remembering.
48
- remember_id_column :: The id column in the +remember_table+, should be a foreign key referencing the accounts table.
49
- remember_key_column :: The remember key/token column in the +remember_table+.
50
- remember_notice_flash :: The flash notice to show after remember setting has been updated.
51
- remember_page_title :: The page title to use on the change remember settings form.
52
- remember_param :: The parameter name to use for the remember password settings choice.
53
- remember_period :: The additional time to extend the remember deadline if extending remember deadlines.
54
- remember_redirect :: Where to redirect after changing the remember settings.
55
- remember_remember_label :: The label for turning on remembering.
56
- remember_remember_param_value :: The parameter value for switching on remembering.
57
- remember_route :: The route to the change remember settings action. Defaults to +remember+.
58
- remember_table :: The name of the remember keys table.
59
-
60
- == Auth Methods
61
-
62
- add_remember_key :: Add a remember key for the current account to the remember keys table.
63
- after_load_memory :: Run arbitrary code after autologging in an account via a remember token.
64
- after_remember :: Run arbitrary code after changing the remember settings.
65
- before_load_memory :: Run arbitrary code before autologging in an account via a remember token.
66
- before_remember :: Run arbitrary code before changing the remember settings.
67
- before_remember_route :: Run arbitrary code before handling the remember route.
68
- disable_remember_login :: Disable the remember key token, clearing the token from the database so future connections with the token will not be recognized.
69
- forget_login :: Forget the current remember token, deleting the related cookie. Other browsers that have the cookie cached can still use it login.
70
- generate_remember_key_value :: A random string to use as the remember key.
71
- get_remember_key :: Retrieve the remember key from the database.
72
- load_memory :: If the remember key cookie is included in the request, and the user is not currently logged in, check the remember keys table and autologin the user if the remember key cookie matches the current remember key for the account. This method needs to be called manually inside the Roda route block to autologin users.
73
- logged_in_via_remember_key? :: Whether the current session was logged in via a remember key.
74
- remembered_session_id :: The session_id which is validly remembered, if any.
75
- remember_key_value :: The current value of the remember key/token.
76
- remember_login :: Set the cookie containing the remember token, so that future sessions will be autologged in.
77
- remember_response :: Return a response after successfully changing remember settings. By default, redirects to +remember_redirect+.
78
- remember_view :: The HTML to use for the change remember settings form.
79
- remove_remember_key(id_value=account_id) :: Delete the related remember key from the database.
@@ -1,66 +0,0 @@
1
- = Documentation for Reset Password Feature
2
-
3
- The reset password feature implements password resets. If the user enters
4
- an invalid password, they will be displayed a form where they can request
5
- a password reset. Submitting that form will send an email containing a
6
- link, and that link will taken them to a password reset form. Depends on
7
- the login feature.
8
-
9
- == Auth Value Methods
10
-
11
- no_matching_reset_password_key_error_flash :: The flash error message to show if attempting to access the reset password form with an invalid key.
12
- reset_password_additional_form_tags :: HTML fragment containing additional form tags to use on the reset password form.
13
- reset_password_autologin? :: Whether to autologin the user after successfully resetting a password, false by default.
14
- reset_password_button :: The text to use for the reset password button.
15
- reset_password_deadline_column :: The column name in the +reset_password_table+ storing the deadline after which the token will be ignored.
16
- reset_password_deadline_interval :: The amount of time for which to allow users to reset their passwords, 1 day by default. Only used if +set_deadline_values?+ is true.
17
- reset_password_email_last_sent_column :: The email last sent column in the +reset_password_table+. Set to nil to always send a reset password request email when requested.
18
- reset_password_email_recently_sent_error_flash :: The flash error to show if not sending reset password request email because one has been sent recently.
19
- reset_password_email_recently_sent_redirect :: Where to redirect if not sending reset password request email because one has been sent recently.
20
- reset_password_email_sent_notice_flash :: The flash notice to show after a reset password request email has been sent.
21
- reset_password_email_sent_redirect :: Where to redirect after sending a reset password request email.
22
- reset_password_email_subject :: The subject to use for the reset password request email.
23
- reset_password_error_flash :: The flash error to show after resetting a password.
24
- reset_password_explanatory_text :: The text to display above the button to request a password reset.
25
- reset_password_id_column :: The id column in the +reset_password_table+, should be a foreign key referencing the accounts table.
26
- reset_password_key_column :: The reset password key/token column in the +reset_password_table+.
27
- reset_password_key_param :: The parameter name to use for the reset password key.
28
- reset_password_notice_flash :: The flash notice to show after resetting a password.
29
- reset_password_page_title :: The page title to use on the reset password form.
30
- reset_password_redirect :: Where to redirect after resetting a password.
31
- reset_password_request_additional_form_tags :: HTML fragment containing additional form tags to use on the reset password request form.
32
- reset_password_request_button :: The text to use for the reset password request button.
33
- reset_password_request_error_flash :: The flash error to show if not able to send a reset password request email.
34
- reset_password_request_link_text :: The text to use for a link to the page to request a password reset.
35
- reset_password_request_page_title :: The page title to use on the reset password request form.
36
- reset_password_request_route :: The route to the reset password request action. Defaults to +reset-password-request+.
37
- reset_password_route :: The route to the reset password action. Defaults to +reset-password+.
38
- reset_password_session_key :: The key in the session to hold the reset password key temporarily.
39
- reset_password_skip_resend_email_within :: The number of seconds before sending another reset password request email, if +reset_password_email_last_sent_column+ is set.
40
- reset_password_table :: The name of the reset password keys table.
41
-
42
- == Auth Methods
43
-
44
- account_from_reset_password_key(key) :: Retrieve the account using the given reset password key, or return nil if no account matches.
45
- after_reset_password :: Run arbitrary code after successfully resetting a password.
46
- after_reset_password_request :: Run arbitrary code after sending the reset password request email.
47
- before_reset_password :: Run arbitrary code before resetting a password.
48
- before_reset_password_request :: Run arbitrary code before sending the reset password request email.
49
- before_reset_password_request_route :: Run arbitrary code before handling a reset password request route.
50
- before_reset_password_route :: Run arbitrary code before handling a reset password route.
51
- create_reset_password_email :: A Mail::Message for the reset password request email.
52
- create_reset_password_key :: Add the reset password key data to the database.
53
- get_reset_password_email_last_sent :: Get the last time a reset password request email is sent, or nil if there is no last sent time.
54
- get_reset_password_key(id) :: Get the password reset key for the given account id from the database.
55
- login_failed_reset_password_request_form :: The HTML to use for a form to request a password reset, shown on the login page after the user tries to login with an invalid password.
56
- remove_reset_password_key :: Remove the reset password key for the current account, run after successful password reset.
57
- reset_password_email_body :: The body to use for the reset password request email.
58
- reset_password_email_link :: The link to the reset password form in the reset password request email.
59
- reset_password_email_sent_response :: Return a response after successfully sending a password reset email. By default, redirects to +reset_password_email_sent_redirect+.
60
- reset_password_key_insert_hash :: The hash to insert into the +reset_password_table+.
61
- reset_password_key_value :: The reset password key for the current account.
62
- reset_password_request_view :: The HTML to use for the reset password request form.
63
- reset_password_response :: Return a response after successfully resetting a password. By default, redirects to +reset_password_redirect+.
64
- reset_password_view :: The HTML to use for the reset password form.
65
- send_reset_password_email :: Send the reset password request email.
66
- set_reset_password_email_last_sent :: Set the last time a reset password request email is sent.
@@ -1,17 +0,0 @@
1
- = Documentation for Reset Password Notify Feature
2
-
3
- The reset password notify feature emails the user after the user has
4
- reset their password. The user has already been sent a reset password
5
- email by this point, so they know a password reset was requested, but
6
- this feature allows for confirming that the password reset process
7
- was completed. Depends on the reset_password feature.
8
-
9
- == Auth Value Methods
10
-
11
- reset_password_notify_email_subject :: The subject to use for the reset password notify email.
12
- reset_password_notify_email_body :: The body to use for the reset password notify email.
13
-
14
- == Auth Methods
15
-
16
- create_reset_password_notify_email :: A Mail::Message for the reset password notify email.
17
- send_reset_password_notify_email :: Send the reset password notify email.
@@ -1,28 +0,0 @@
1
- = Documentation for Session Expiration Feature
2
-
3
- The session expiration feature allows setting an inactivity timeout and a max
4
- lifetime for sessions. When this feature is used, you should use
5
- +rodauth.check_session_expiration+ at the top (or other appropriate place)
6
- in your routing tree.
7
-
8
- route do |r|
9
- rodauth.check_session_expiration
10
- r.rodauth
11
-
12
- # ...
13
- end
14
-
15
- When checking session expiration, if the last activity was more than the
16
- inactivity timeout, or the session was created more the maximum lifetime
17
- ago, the session is cleared, and the user is redirected to the login page.
18
-
19
- == Auth Value Methods
20
-
21
- max_session_lifetime :: The maximum number of seconds since session creation that sessions will be valid for, regardless of session activity. 86400 by default (1 day).
22
- session_created_session_key :: The session key storing the session creation timestamp.
23
- session_expiration_default :: Whether to expire sessions that don't have the created at or last activity at timestamps set, true by default.
24
- session_expiration_error_flash :: The flash error to show if a session expires.
25
- session_expiration_error_status :: The error status to use when a JSON request is made and the session has expired, 401 by default.
26
- session_expiration_redirect :: Where to redirect if a session expires.
27
- session_inactivity_timeout :: The maximum number of seconds allowed since the last activity before the session will be considered invalid. 1800 by default (30 minutes).
28
- session_last_activity_session_key :: The session key storing the last session activity timestamp.
@@ -1,37 +0,0 @@
1
- = Documentation for Single Session Feature
2
-
3
- The single session feature stores the key for the session in a
4
- database table whenever a user logs in to the system. In your
5
- routing block, you can check that the session key given matches
6
- the stored key by doing:
7
-
8
- rodauth.check_single_session
9
-
10
- It is not recommended to use this feature unless you
11
- have a policy that requires it. Many users find it useful to
12
- be able to have multiple concurrent sessions, and restricting
13
- this ability does not make things more secure. You can use the
14
- active_sessions feature for something with similar behavior but
15
- that allows for concurrent sessions.
16
-
17
- One of the side benefits with this feature is that
18
- logouts reset the single session key, so attempts to reuse
19
- the previous session after logout no longer work.
20
-
21
- == Auth Value Methods
22
-
23
- allow_raw_single_session_key? :: Whether to allow a raw single session key to be accepted, should only be enabled for graceful transition when +hmac_secret+ is first set.
24
- inactive_session_error_status :: The error status to use when a JSON request is made and the session is no longer active, 401 by default.
25
- single_session_error_flash :: The flash error to display if the current session is no longer the active session for the account.
26
- single_session_id_column :: The column in the +single_session_table+ containing the account id.
27
- single_session_key_column :: The column in the +single_session_table+ containing the single session key.
28
- single_session_redirect :: Where to redirect if the current session is no longer the active session for the account.
29
- single_session_session_key :: The session key name to use for storing the single session key.
30
- single_session_table :: The database table storing single session keys.
31
-
32
- == Auth Methods
33
-
34
- currently_active_session? :: Whether the current session is the active session for the user.
35
- no_longer_active_session :: The action to take if the current session is no longer the active session for the user.
36
- reset_single_session_key :: Reset the single session key for the user, by default to a new random key.
37
- update_single_session_key :: Update the single session key in the current session and in the database, reflecting that the current session is the active session for the user.
data/doc/sms_codes.rdoc DELETED
@@ -1,138 +0,0 @@
1
- = Documentation for SMS Codes Feature
2
-
3
- The sms codes feature allows for multifactor authentication via codes provided via
4
- SMS messages. It is usually used as a backup if other multifactor authentication is not available
5
- or has been locked out, but it can be used as the primary multifactor authentication method.
6
-
7
- This feature allows users to register their mobile phone number with the system, confirm that
8
- they can receive SMS messages on the mobile phone number they have registered, request
9
- SMS authentication codes, authenticate via SMS codes, and disable SMS authentication.
10
-
11
- While this feature sets up all of the infrastructure needed to support SMS authentication,
12
- it doesn't handle sending SMS messages itself. There are many ruby libraries that send
13
- SMS messages, and you can choose which one to use. When using this feature, you must
14
- use the +sms_send+ configuration method and send the SMS using whatever SMS library
15
- you prefer:
16
-
17
- sms_send do |phone_number, message|
18
- # ...
19
- end
20
-
21
- == Auth Value Methods
22
-
23
- no_current_sms_code_error_flash :: The flash error to show when going to the SMS authentication page and no current SMS authentication code is available.
24
- sms :: A hash of SMS information for the user, if SMS authentication has been setup.
25
- sms_already_setup_error_flash :: The flash error to show when going to a page to setup SMS authentication if SMS authentication has already been setup.
26
- sms_already_setup_error_status :: The response status to use when going to a page to setup SMS authentication if SMS authentication has already been setup, 403 by default.
27
- sms_already_setup_redirect :: Where to redirect when going to a page to setup SMS authentication if SMS authentication has already been setup.
28
- sms_auth_additional_form_tags :: HTML fragment containing additional form tags when authenticating via SMS.
29
- sms_auth_button :: Text to use for button on the form to authenticate via SMS.
30
- sms_auth_code_length :: The length of SMS authentication codes, 6 by default.
31
- sms_auth_link_text :: The text to use for the link from the multifactor auth page.
32
- sms_auth_page_title :: The page title to use on the form to authenticate via SMS code.
33
- sms_auth_redirect :: Where to redirect if SMS authentication is needed.
34
- sms_auth_route :: The route to the SMS authentication action. Defaults to +sms-auth+.
35
- sms_code_allowed_seconds :: The number of seconds after an SMS authentication is sent until it is no longer valid, 300 seconds by default.
36
- sms_code_column :: The column in the +sms_codes_table+ containing the currently valid SMS authentication/confirmation code.
37
- sms_code_label :: The label for SMS codes.
38
- sms_code_param :: The parameter name for SMS codes.
39
- sms_codes_primary? :: Whether SMS codes are a primary multifactor authentication method. If not, they cannot be setup unless multifactor authentication has already been setup.
40
- sms_codes_table :: The name of the table storing SMS code data.
41
- sms_confirm_additional_form_tags :: HTML fragment containing additional form tags when confirming SMS setup.
42
- sms_confirm_button :: Text to use for button on the form to confirm SMS setup.
43
- sms_confirm_code_length :: The length of SMS confirmation codes, 12 by default, as there is no lockout.
44
- sms_confirm_deadline :: The number of seconds before an SMS confirmation code expires (86400 seconds by default).
45
- sms_confirm_notice_flash :: The flash notice to show when SMS authentication setup has been confirmed.
46
- sms_confirm_page_title :: The page title to use on the form to authenticate via SMS code.
47
- sms_confirm_redirect :: Where to redirect after SMS authentication setup has been confirmed.
48
- sms_confirm_route :: The route to the SMS setup confirmation action. Defaults to +sms-confirm+.
49
- sms_disable_additional_form_tags :: HTML fragment containing additional form tags when disabling SMS authentication.
50
- sms_disable_button :: Text to use for button on the form to disable SMS authentication.
51
- sms_disable_error_flash :: The flash error to show when disabling SMS authentication fails.
52
- sms_disable_link_text :: The text to use for the remove link from the multifactor manage page.
53
- sms_disable_notice_flash :: The flash notice to show when SMS authentication has been successfully disabled.
54
- sms_disable_page_title :: The page title to use on the form to disable SMS authentication.
55
- sms_disable_redirect :: Where to redirect after SMS authentication has been disabled.
56
- sms_disable_route :: The route to the SMS authentication disable action. Defaults to +sms-disable+.
57
- sms_failure_limit :: The number of failures until SMS authentication is locked out.
58
- sms_failures_column :: The column in the +sms_codes_table+ containing the number of SMS authentication failures since the last successful authentication.
59
- sms_id_column :: The column in the +sms_codes_table+ containing the account id.
60
- sms_invalid_code_error_flash :: The flash error to show when an invalid SMS authentication code is used.
61
- sms_invalid_code_message :: The error message to show when an invalid SMS code is used.
62
- sms_invalid_confirmation_code_error_flash :: The flash error to show when an invalid SMS confirmation code is used.
63
- sms_invalid_phone_message :: The error message to show when an invalid SMS phone number is used.
64
- sms_issued_at_column :: The column in the +sms_codes_table+ containing the time the SMS code was issued.
65
- sms_lockout_error_flash :: The flash error to show when SMS authentication has been locked out due to repeated failures.
66
- sms_lockout_redirect :: Where to redirect after SMS authentication has been locked out.
67
- sms_needs_confirmation_notice_flash :: The flash notice to show on SMS authentication pages when SMS authentication setup needs confirmation (uses +sms_needs_confirmation_error_flash+ by default).
68
- sms_needs_confirmation_error_flash :: The flash error to show on SMS authentication pages when SMS authentication setup needs confirmation.
69
- sms_needs_confirmation_error_status :: The response status to use on SMS authentication pages when SMS authentication setup needs confirmation, 403 by default.
70
- sms_needs_confirmation_redirect :: Where to redirect after SMS setup, when confirmation is required.
71
- sms_needs_setup_redirect :: Where to redirect if going to an SMS authentication page when SMS authentication has not been setup.
72
- sms_not_setup_error_flash :: The flash error to show when on SMS authentication pages when SMS authentication has not yet been setup.
73
- sms_phone_column :: The column in the +sms_codes_table+ containing the phone number to which to send SMS messages.
74
- sms_phone_input_type :: The input type to use for SMS phone numbers, tel by default.
75
- sms_phone_label :: The label for SMS phone numbers.
76
- sms_phone_min_length :: The minimum length of phone numbers allowed for SMS authentication, 7 by default.
77
- sms_phone_param :: The parameter name for SMS phone numbers.
78
- sms_request_additional_form_tags :: HTML fragment containing additional form tags when requesting an SMS authentication code.
79
- sms_request_button :: Text to use for button on the form to request an SMS authentication code.
80
- sms_request_notice_flash :: The flash notice to show when an SMS authentication code is requested.
81
- sms_request_page_title :: The page title to use on the form to request an SMS authentication code.
82
- sms_request_redirect :: Where to redirect after requesting an SMS authentication code.
83
- sms_request_route :: The route to the SMS authentication code request action. Defaults to +sms-request+.
84
- sms_setup_additional_form_tags :: HTML fragment containing additional form tags when setting up SMS authentication.
85
- sms_setup_button :: Text to use for button on the form to setup SMS authentication.
86
- sms_setup_error_flash :: The flash error to show when setting up SMS authentication fails.
87
- sms_setup_link_text :: The text to use for the setup link from the multifactor manage page.
88
- sms_setup_page_title :: The page title to use on the form to setup SMS authentication.
89
- sms_setup_route :: The route to the SMS authentication setup action. Defaults to +sms-setup+.
90
-
91
- == Auth Methods
92
-
93
- after_sms_confirm :: Run arbitrary code after successful SMS authentication confirmation.
94
- after_sms_disable :: Run arbitrary code after disabling SMS authentication.
95
- after_sms_failure :: Run arbitrary code after SMS authentication failure.
96
- after_sms_request :: Run arbitrary code after SMS authentication code request.
97
- after_sms_setup :: Run arbitrary code after SMS authentication setup.
98
- before_sms_auth :: Run arbitrary code before SMS authentication.
99
- before_sms_auth_route :: Run arbitrary code before handling SMS authentication route.
100
- before_sms_confirm :: Run arbitrary code before SMS confirmation.
101
- before_sms_confirm_route :: Run arbitrary code before handling SMS confirmation route.
102
- before_sms_disable :: Run arbitrary code before disabling SMS authentication.
103
- before_sms_disable_route :: Run arbitrary code before handling SMS disable route.
104
- before_sms_request :: Run arbitrary code before sending SMS code.
105
- before_sms_request_route :: Run arbitrary code before handling SMS request route.
106
- before_sms_setup :: Run arbitrary code before setting up SMS authentication.
107
- before_sms_setup_route :: Run arbitrary code before handling SMS setup route.
108
- sms_auth_message(code) :: The SMS message to use for the given authentication code.
109
- sms_auth_view :: The HTML to use for the form to authenticate via SMS code.
110
- sms_available? :: Whether SMS authentication is ready for use.
111
- sms_code_issued_at :: The timestamp the current SMS code was issued at.
112
- sms_code_match?(code) :: Whether there is an active SMS authentication code for the current account and the given code matches it.
113
- sms_confirm_message(code) :: The SMS message to use for the given confirmation code.
114
- sms_confirm_response :: Return a response after successfully confirming SMS code during SMS setup. By default, redirects to +sms_confirm_redirect+.
115
- sms_confirm_view :: The HTML to use for the form to authenticate via SMS code.
116
- sms_confirmation_match?(code) :: Whether there is an active SMS confirmation code for the current account and the given code matches it.
117
- sms_current_auth? :: Whether there is a active SMS authentication code for the current account.
118
- sms_disable :: Action to take to disable SMS authentication for the account.
119
- sms_disable_response :: Return a response after successfully disabling SMS. By default, redirects to +sms_disable_redirect+.
120
- sms_disable_view :: The HTML to use for the form to disable SMS authentication.
121
- sms_failures :: The number of SMS authentication failures since the last successfully SMS authentication for this account.
122
- sms_locked_out? :: Whether SMS authentication has been locked out for the current account.
123
- sms_needs_confirmation? :: Whether SMS authentication has been setup but not confirmed for the current account.
124
- sms_needs_confirmation_response :: Return a response after successfully providing SMS number during SMS setup. By default, redirects to +sms_needs_confirmation_redirect+.
125
- sms_new_auth_code :: A new SMS authentication code that can be used for the account.
126
- sms_new_confirm_code :: A new SMS confirmation code that can be used for the account.
127
- sms_normalize_phone(phone) :: A normalized version of the given phone number, by default removing everything except 0-9.
128
- sms_record_failure :: Record an SMS authentication failure for the current account.
129
- sms_remove_expired_confirm_code :: Remove an expired SMS confirm code, allowing setup of a new sms confirm code.
130
- sms_remove_failures :: Reset the SMS authentication failure counter for the current account, used after a successful multifactor authentication.
131
- sms_request_response :: Return a response after a successful SMS request during SMS authentication. By default, redirects to +sms_auth_redirect+.
132
- sms_request_view :: The HTML to use for the form to request an SMS authentication code.
133
- sms_send(phone, message) :: Send the given message to the given phone number via SMS. By default a NotImplementedError is raised, this is the only method that must be overridden.
134
- sms_set_code(code) :: Set the SMS authentication code for the current account to the given code. The code can be nil to specify that no SMS authentication code is currently valid.
135
- sms_setup :: Setup SMS authentication for the current account.
136
- sms_setup? :: Whether SMS authentication has been setup and confirmed for the current account.
137
- sms_setup_view :: The HTML to use for the form to setup SMS authentication.
138
- sms_valid_phone?(phone) :: Whether the given phone number is a valid phone number.