rodauth 2.36.0 → 2.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,74 +0,0 @@
1
- = jwt Feature Additions/Improvements
2
-
3
- * JSON format responses now have the response content type set to
4
- application/json.
5
-
6
- * The jwt feature now does not break if HTTP Basic or Digest
7
- authentication is used.
8
-
9
- * If jwt_check_accept? is true, Rodauth will return a 406 error if
10
- a request Accept header is provided and it does not indicate that
11
- JSON is acceptable.
12
-
13
- * Many new configuration methods have been added:
14
-
15
- * invalid_jwt_format_error_message: The error message to use when a
16
- JWT with an invalid format is submitted in the Authorization
17
- header.
18
-
19
- * json_accept_regexp: The regexp to use to check the Accept header
20
- for JSON if jwt_check_accept? is true.
21
-
22
- * json_not_accepted_error_message: The error message to display if
23
- jwt_check_accept? is true and the Accept header is present but
24
- does not match json_request_content_type_regexp.
25
-
26
- * json_request_content_type_regexp: The regexp to use to recognize
27
- a request as a json request.
28
-
29
- * json_response_content_type: The content type to set for json
30
- responses, application/json by default.
31
-
32
- * jwt_authorization_ignore: A regexp matched against the
33
- Authorization header, which skips JWT processing if it matches.
34
- By default, HTTP Basic and Digest authentication are ignored.
35
-
36
- * jwt_authorization_remove: A regexp to remove from the
37
- Authorization header before processing the JWT. By default, a
38
- Bearer prefix is removed.
39
-
40
- * jwt_check_accept?: Whether to check the Accept header to see if
41
- the client supports JSON responses, false by default for backwards
42
- compatibility.
43
-
44
- * session_jwt: An encoded JWT for the current session.
45
-
46
- * use_jwt?: Whether to use the JWT in the Authorization header for
47
- authentication information. If false, falls back to using the
48
- rack session. By default, the Authorization header is used if it
49
- is present, if only_json? is true, or if the request uses a json
50
- content type.
51
-
52
- = jwt Feature Backwards Compatibility Issues
53
-
54
- * The only_json? setting in the jwt feature is now only true by
55
- default if the :json=>:only option was used when loading the
56
- rodauth plugin into the roda app. Previously, it was always true,
57
- but it only was considered in requests to Rodauth endpoints. It
58
- now also is considered in most Rodauth calls, and if true will use
59
- an empty session instead of falling back to the rack session if an
60
- Authorization header is not present.
61
-
62
- * Previously, the jwt feature only handled requests where the
63
- request content-type is JSON. It now also handles non-JSON
64
- requests if the Authorization header is present or if only_json?
65
- is true.
66
-
67
- * If an invalid JWT format is used in the Authorization header,
68
- Rodauth now returns a 400 error, instead of raising an exception.
69
-
70
- = Other Improvements
71
-
72
- * A template_opts configuration method has been added, for
73
- overriding the view/render options. One possible use for this is
74
- to specify a non-default layout.
@@ -1,37 +0,0 @@
1
- = New Feature
2
-
3
- * An http_basic_auth feature has been added, allowing the use of
4
- HTTP Basic Auth to login.
5
-
6
- = New Configuration Options for jwt Feature
7
-
8
- * jwt_session_hash has been added, for modifying the hash given before
9
- creating the JWT. This can be used for setting JWT claims.
10
- Example:
11
-
12
- jwt_session_hash do
13
- super().merge(:exp=>Time.now.to_i + 120)
14
- end
15
-
16
- * jwt_decode_opts has been added for specifying additional options to
17
- JWT.decode. Among other things, this allows for JWT claim
18
- verification. Example:
19
-
20
- jwt_decode_opts(:verify_expiration=>true)
21
-
22
- * jwt_session_key has been added, specifying a key in the JWT that
23
- will be used to store session information, instead of storing
24
- session keys in the root of the JWT. Use of this option can avoid
25
- issues with reserved JWT claim names, and will probably be enabled
26
- by default starting in Rodauth 2.
27
-
28
- * jwt_symbolize_deeply? configuration method has been added, for
29
- whether to symbolize nested keys when decoding a JWT session hash.
30
-
31
- = Other Improvements
32
-
33
- * The reset_password feature no longer attempts to render a template
34
- in json-only mode.
35
-
36
- * The jwt_payload method is now memoized by default.
37
-
@@ -1,6 +0,0 @@
1
- = Improvements
2
-
3
- * The reset password, unlock account, and verify account features now
4
- temporarily store the feature-specific keys in the session instead
5
- of keeping them as parameters, which avoids leaking the keys to
6
- asset hosts or other external servers via the HTTP Referer header.
@@ -1,14 +0,0 @@
1
- = Improvements
2
-
3
- * When using a browser, Rodauth now uses an appropriate 401, 403,
4
- or 422 error status for errors instead of using 200 success status.
5
- Many configuration methods have been added to customize the status
6
- codes used for specific types of errors.
7
-
8
- * The json_response_custom_error_status? configuration method
9
- has been added to the jwt feature, which if set to true makes
10
- the jwt feature use the same error status codes for JSON API
11
- requests that it would use for browser requests. For backward
12
- compatibility, the default is to continue to use the 400
13
- error status for all errors in the JSON API, but this will
14
- change in Rodauth 2.
@@ -1,15 +0,0 @@
1
- = New Features
2
-
3
- * Roda.precompile_rodauth_templates has been added. This method
4
- allows for precompiling the templates that rodauth uses, which
5
- allows for memory saving when using a forking webserver that
6
- preloads the application, and also allows Rodauth to be used
7
- with an application that uses chroot after loading.
8
-
9
- = Improvements
10
-
11
- * If requesting a password reset link more than once, the same
12
- password reset key will be used. Previously, subsequent
13
- emails after the first request would contain an invalid key,
14
- so if the email for the original request was lost, you could
15
- not generate another key until that key expired.
@@ -1,361 +0,0 @@
1
- = New Features
2
-
3
- * A webauthn feature has been added, allowing multifactor
4
- authentication using WebAuthn. It allows for registering multiple
5
- WebAuthn authenticators per account, authenticating using
6
- WebAuthn, and removing WebAuthn authenticators. This feature
7
- depends on the webauthn gem.
8
-
9
- WebAuthn in browsers requires javascript to work, but Rodauth's
10
- approach has the javascript set hidden form inputs and then use a
11
- standard form submission, making it easy to test applications
12
- using WebAuthn without a full browser, as long as a software
13
- WebAuthn authenticator can be used (the webauthn gem provides
14
- such an authenticator).
15
-
16
- * A webauthn_login feature has been added, allowing passwordless
17
- logins using WebAuthn.
18
-
19
- * A webauthn_verify_account feature has been added, which requires
20
- setting up a WebAuthn authenticator during account verification.
21
- This allows for setups where WebAuthn is the sole method of
22
- authentication.
23
-
24
- * An active_sessions feature has been added, which disallows
25
- session reuse after logout, and allows for a global logout of all
26
- sessions for the account. It also supports inactivity and
27
- lifetime deadlines for sessions. This also integrates with the
28
- jwt_refresh feature to disable JWT access token usage after
29
- logout.
30
-
31
- * An audit_logging feature has been added, which logs Rodauth
32
- actions to a database table. This hooks into all of Rodauth's
33
- after_* hooks, and will implement audit logging for all
34
- features that use such hooks.
35
-
36
- * The confirm_password feature can now operate as multifactor
37
- authentication if the user has a password but was originally
38
- authenticated using the webauthn_login feature.
39
-
40
- * The multifactor authentication support now better handles
41
- multiple multifactor authentication methods. When setting up
42
- multifactor authentication, a page is provided linking to all
43
- enabled multifactor authentication options. When authenticating
44
- via an additional factor, a page is provided linking to all
45
- multifactor authentication options that have been setup and are
46
- available for use. There is also a page to disable all multifactor
47
- authentication methods that have been setup, and revert to single
48
- factor authentication.
49
-
50
- To provide a better user experience, if there would only be a
51
- single link on the pages to setup multifactor authentication
52
- or authenticate with an additional factor, the user is redirected
53
- directly to the appropriate page.
54
-
55
- * A translate configuration method has been added. This is called
56
- with a translation key and default value for the translation, and
57
- allows for internationalizing Rodauth. All translatable strings
58
- are passed through this method, including flash messages, page
59
- titles, button text, field error messages, and link texts.
60
-
61
- * login_return_to_requested_location? and
62
- two_factor_auth_return_to_requested_location? configuration methods
63
- have been added. With these methods set to true, if
64
- rodauth.require_login needs to redirect, it will store the current
65
- page, and after logging in, the user will be redirected back to the
66
- page. Likewise, if rodauth.require_two_factor_authenticated needs
67
- to redirect, it will store the current page, and after multifactor
68
- authentication, the user will be redirected back to the page.
69
-
70
- * domain and base_url configuration methods have been added and it is
71
- recommended that applications use them if they can be reached with
72
- arbitrary Host headers. If not set, Rodauth will use information
73
- from the request, which can be provided by an attacker.
74
-
75
- * The *_url and *_path methods now accept an optional hash of query
76
- parameters to use.
77
-
78
- * Many Rodauth forms will now use appropriate autocomplete and
79
- inputmode attributes on form inputs. You can modify the behavior
80
- using the following configuration methods:
81
-
82
- * autocomplete_for_field?
83
- * inputmode_for_field?
84
- * mark_input_fields_with_autocomplete?
85
- * mark_input_fields_with_inputmode?
86
-
87
- * An sms_phone_input_type configuration method has been added and
88
- now defaults to tel. Previous, the SMS phone input used a text
89
- type.
90
-
91
- * rodauth.require_password_authentication has been added to the
92
- confirm_password_feature, which will redirect to the login page
93
- if not logged in, and will redirect to the confirm password page
94
- if the user was logged in without typing in a password. If the
95
- password_grace_period feature is used, this also redirects if
96
- the password has not been entered recently.
97
-
98
- * rodauth.authenticated_by has been added, which is an array of
99
- strings for all methods by which the current session has been
100
- authenticated, or nil if the session has not been authenticated.
101
-
102
- * rodauth.possible_authentication_methods has been added, which is
103
- an array of strings for all methods by which the current session
104
- could be authenticated.
105
-
106
- * rodauth.autologin_type now returns the type of autologin used if
107
- authenticated using autologin.
108
-
109
- * All *_view configuration methods now have *_page_title
110
- configuration methods for setting custom page titles.
111
-
112
- = Other Improvements
113
-
114
- * The templates Rodauth uses by default are now compatible with
115
- Bootstrap 4, and compatibility with Bootstrap 3 (which Rodauth
116
- previously targeted) has been improved.
117
-
118
- * When requesting a password reset, if the user provides an invalid
119
- login, an input for the login is now displayed so the problem
120
- can be corrected.
121
-
122
- * When setting up an additional multifactor authentication method,
123
- Rodauth no longer overrides which multifactor authentication method
124
- was used to authenticate the current session.
125
-
126
- * When disabling a multifactor authentication method that was not
127
- used to authenticate the current session, the session remains
128
- multifactor authenticated.
129
-
130
- * When multiple multifactor authentication methods are setup for
131
- an account, disabling a multifactor authentication method will not
132
- mark the session as not having multifactor authentication enabled.
133
-
134
- * When disabling OTP authentication, future calls to
135
- rodauth.otp_exists? will return false instead of true.
136
-
137
- * Recovery codes are no longer generated automatically when OTP or
138
- SMS authentication is setup. There is no point generating codes
139
- that the user has not yet viewed, and generating them automatically
140
- will disable automatic redirections in the cases where only one
141
- multifactor authentication method is setup. This can be turned
142
- back on using the auto_add_recovery_codes? configuration method.
143
-
144
- * The OTP setup page now displays better on phones and other devices
145
- with small viewports.
146
-
147
- * Links and alternative login forms shown on the login page are
148
- now in a specific order and not based on the order in which
149
- features were enabled.
150
-
151
- * The link to resend the verify account email is not shown on the
152
- multi-phase login page after the login has been entered if the
153
- account has already been verified.
154
-
155
- * The modifications_require_password? configuration method now
156
- defaults to false for accounts that do not have a password.
157
-
158
- * Multifactor authentication is no longer allowed using the same
159
- factor type as used for initial authentication. Previously,
160
- no multifactor authentication type could be used for initial
161
- authentication, so this wasn't an issue.
162
-
163
- * The verify login change page no longer calls already_logged_in
164
- if the session is already logged in. This method is documented
165
- to only be called on pages that expect not to be already logged
166
- in, and it's common to access the verify login change page
167
- while being logged in, since you need to be logged in to go to
168
- the change login page. The default behavior of already_logged_in
169
- is to do nothing, so this only affects you if you have used the
170
- already_logged_in configuration method.
171
-
172
- * If using the email_auth and verify_account_grace_period features
173
- together, do not show email authentication as an option for
174
- unverified accounts during the grace period.
175
-
176
- * In the lockout feature, generate the unlock account key before
177
- calling send_unlock_account_email, similar to how key generation
178
- happens in other features that send email. This makes it easier
179
- to override the method.
180
-
181
- * Various method visibility issues have been fixed, so that
182
- enabling any feature that ships with Rodauth will not affect
183
- visibility of methods for features already enabled.
184
-
185
- * All Rodauth configuration methods (over 1000) are now documented.
186
-
187
- = Backwards Compatibility
188
-
189
- * The verify_change_login feature has been removed. Users should
190
- switch to the verify_login_change feature, which verifies the
191
- new login works correctly before switching the login.
192
-
193
- * For CSRF protection, Roda's route_csrf plugin is now used by
194
- default instead of rack_csrf. This supports request specific
195
- CSRF tokens by default. The :csrf=>:rack_csrf plugin option
196
- can be used to continue using rack_csrf.
197
-
198
- Roda's route_csrf allows for per-route checking of the CSRF token,
199
- and support for that is enabled for all Rodauth routes. However,
200
- if you were using Rodauth without explicitly loading rack_csrf,
201
- these changes could remove CSRF support from your application.
202
- You should probably load Roda's route_csrf plugin explicitly and
203
- use it in your Roda routing tree if you want CSRF protection for
204
- non-Rodauth routes. You can use the new check_csrf_opts and
205
- check_csrf_block to customize options to pass to check_csrf!, or
206
- set check_csrf? false to disable calling check_csrf!.
207
-
208
- * Email rate limiting is now enabled by default in the lockout,
209
- reset_password, and verify_account features. This requires
210
- adding a column to store the last email sent time to the
211
- related tables, if the tables were created without one:
212
-
213
- DB.add_column :account_password_reset_keys, :email_last_sent,
214
- DateTime, :null=>false, :default=>Sequel::CURRENT_TIMESTAMP
215
- DB.add_column :account_verification_keys, :email_last_sent,
216
- DateTime, :null=>false, :default=>Sequel::CURRENT_TIMESTAMP
217
- DB.add_column :account_lockouts, :email_last_sent, DateTime
218
-
219
- Alternatively, you can set the appropriate configuration method
220
- (e.g. verify_account_email_last_sent_column) to nil to disable
221
- rate limiting.
222
-
223
- * The http_basic_auth feature has been changed significantly.
224
- You should now call rodauth.http_basic_auth in the routing tree
225
- to load authentication information from the Authorization
226
- request header, similar to how rodauth.load_memory works in the
227
- remember feature.
228
-
229
- The require_http_basic_auth configuration method has been renamed
230
- to require_http_basic_auth?. rodauth.require_http_basic_auth?
231
- should now be used to check whether HTTP basic auth is required.
232
- rodauth.require_http_basic_auth now requires that HTTP basic
233
- auth is provided in the request.
234
-
235
- To be more backwards compatible, if not already logged in,
236
- rodauth.require_login will load HTTP basic auth information if
237
- available, and will require HTTP basic auth if
238
- require_http_basic_auth? is configured.
239
-
240
- * If using the Bootstrap 3/4 compatibility, the forms used are
241
- now standard (vertical) Bootstrap forms. Previously, they were
242
- horizontal forms.
243
-
244
- * Most of the strings related to multifactor authentication have
245
- been changed to refer to multifactor authentication instead of
246
- two factor authentication, or changed to refer to a specific
247
- multifactor authentication type (such as TOTP), as appropriate.
248
-
249
- * Periods at the end of some default flash messages have been
250
- removed for consistency.
251
-
252
- * The remember feature no longer depends on the confirm_password
253
- feature. You must now enable confirm_password separately if you
254
- want to use it.
255
-
256
- * Login confirmation is no longer required by default when
257
- verifying accounts or verifying login changes. In both cases,
258
- entering an invalid login causes no problems.
259
-
260
- * The otp_drift configuration method now defaults to 30, to allow
261
- 30 seconds of drift. The previous setting of nil generally
262
- resulted in usability problems, especially without good clock
263
- synchronization.
264
-
265
- * The json_response_custom_error_status? configuration method now
266
- defaults to true, so that custom error statuses are now used by
267
- default, instead of a generic 400 response.
268
-
269
- * The jwt_check_accept? configuration method now defaults to true,
270
- so that the request Accept header is checked.
271
-
272
- * The verify_account_set_password? configuration method now defaults
273
- to true, so that passwords will be set when verifying accounts
274
- instead of when creating accounts. This prevents issues when
275
- an attacker creates an account with a password they know, if the
276
- user with access to the email address verifies the account.
277
-
278
- * The mark_input_fields_as_required? configuration method now defaults
279
- to true. Most of rodauth's input fields are required, and this
280
- provides a nicer experience. However, it may cause accessibility
281
- issues if screen readers do not handle invalid form submissions due
282
- to missing required fields in an accessible manner.
283
-
284
- * The login_input_type configuration method now defaults to email if
285
- login_column is :email (the default setting). This can cause
286
- accessibility issues if screen readers do not handle invalid form
287
- submissions due to an invalid login field format in an accessible
288
- manner. It can also break installations that leave login_column
289
- as :email but do not use email addresses for logins.
290
-
291
- * The json_response_success_key configuration method now defaults to
292
- success, so success messages are included by default. This can be
293
- set back to nil to not include them.
294
-
295
- * The single_session and session_expiration plugin now use a
296
- configurable error status code for JSON requests when the session
297
- has expired, using inactive_session_error_status and
298
- session_expiration_error_status configuration methods,
299
- respectively.
300
-
301
- * If you are using the jwt_refresh feature and used the migration
302
- previously recommended in the README, you should mark the account_id
303
- field as NOT NULL and add an index:
304
-
305
- DB.alter_table(:account_jwt_refresh_keys) do
306
- set_column_not_null :account_id
307
- add_index :account_id, :name=>:account_jwt_rk_account_id_idx
308
- end
309
-
310
- * The otp authentication form no longer shows SMS or recovery code
311
- information on failure. The multifactor authentication page will
312
- have links to SMS or recovery code authentication if they have been
313
- setup, and will redirect or show the appropriate links to those
314
- authentication methods if OTP authentication gets locked out.
315
-
316
- * Disabling OTP authentication no longer automatically disables SMS
317
- authentication and recovery codes, and disabling SMS authentication
318
- no longer disables recovery codes. To disable all multifactor
319
- authentication methods at once, the new multifactor authentication
320
- disable page should be used. If you want to revert to the previous
321
- behavior of automatic disabling, override after_otp_disable to
322
- disable SMS and recovery codes, and override after_sms_disable to
323
- disable recovery codes.
324
-
325
- * HTML id attributes in the recovery_codes and remember features have
326
- been modified to use - instead of _, for consistency with all other
327
- Rodauth features.
328
-
329
- * Ruby 1.8 support has been dropped. The minimum supported version is
330
- now Ruby 1.9.2. Support for versions of Ruby that are no longer
331
- supported by ruby-core may be dropped in future minor releases if
332
- keeping the support becomes a maintenance issue.
333
-
334
- * The following configuration methods have been replaced:
335
-
336
- * create_account_link -> create_account_link_text
337
- * reset_password_request_link -> reset_password_request_link_text
338
- * verify_account_resend_link -> verify_account_resend_link_text
339
-
340
- The new methods take only the text of the link, the path to link
341
- to can already be determined by Rodauth.
342
-
343
- * The following configuration methods have been removed:
344
-
345
- * account_model
346
- * attempt_to_create_unverified_account_notice_message
347
- * attempt_to_login_to_unverified_account_notice_message
348
- * before_otp_authentication_route
349
- * clear_remembered_session_key
350
- * no_matching_email_auth_key_message
351
- * no_matching_reset_password_key_message
352
- * no_matching_unlock_account_key_message
353
- * no_matching_verify_account_key_message
354
- * no_matching_verify_login_change_key_message
355
- * remembered_session_key
356
- * two_factor_session_key
357
-
358
- Most of these methods were already deprecated.
359
-
360
- * Route blocks in external Rodauth features must now have an arity
361
- of 1.
@@ -1,31 +0,0 @@
1
- = New Features
2
-
3
- * A check_csrf configuration method has been added for checking
4
- the CSRF token. This is useful in cases where the CSRF protection
5
- is provided by something other than the Roda route_csrf plugin.
6
-
7
- = Other Improvements
8
-
9
- * When using the http_basic_auth feature, logged_in? now checks for
10
- Basic authentication if the session is not already authenticated
11
- and Basic authentication has not yet been checked. This increases
12
- compatibility for applications that were using the http_basic_auth
13
- feature in Rodauth 1.
14
-
15
- * When creating accounts, the password field now correctly uses the
16
- new-password autocomplete attribute instead of the current-password
17
- autocomplete attribute.
18
-
19
- * When using the jwt feature, Rodauth no longer checks CSRF tokens
20
- in requests to Rodauth routes if the request submitted is a JSON
21
- request, includes a JWT, or Rodauth has been configured in JSON-only
22
- mode.
23
-
24
- * When using the verify_account_grace_period feature, if there is an
25
- unverified account without a password, do not consider the account
26
- open. Attempting to login into the account in such a case now
27
- shows a message letting the user know to verify the account.
28
-
29
- * The json_response_body configuration method is now used consistently
30
- in the jwt feature for all JSON responses. Previously, there were
31
- some cases that did not use it.
@@ -1,47 +0,0 @@
1
- = New Features
2
-
3
- * An argon2 feature has been added that supports using the argon2
4
- password hashing algorithm instead of the bcrypt password hashing
5
- algorithm. While argon2 does not provide an advantage over bcrypt
6
- if the attacker cannot access the password hashes directly (which
7
- is how Rodauth is recommended to be used), in cases where attackers
8
- can access the password hashes directly, argon2 is thought to be
9
- more difficult or expensive to crack due to requiring more memory
10
- (bcrypt is not a memory-hard password hash algorithm).
11
-
12
- If you are using this feature with Rodauth's database authentication
13
- functions, you need to make sure that the database authentication
14
- functions are configured to support argon2 in addition to bcrypt.
15
- You can do this by passing the :argon2 option when calling the
16
- method to define the database functions. In this example, DB should
17
- be your Sequel::Database object (this could be self if used in a
18
- Sequel migration):
19
-
20
- require 'rodauth/migrations'
21
-
22
- # If the functions are already defined and you are not using PostgreSQL,
23
- # you need to drop the existing functions.
24
- Rodauth.drop_database_authentication_functions(DB)
25
-
26
- # If you are using the disallow_password_reuse feature, also drop the
27
- # database functions related to that if you are not using PostgreSQL:
28
- Rodauth.drop_database_previous_password_check_functions(DB)
29
-
30
- # Define new functions that support argon2:
31
- Rodauth.create_database_authentication_functions(DB, argon2: true)
32
-
33
- # If you are using the disallow_password_reuse feature, also define
34
- # new functions that support argon2 for that:
35
- Rodauth.create_database_previous_password_check_functions(DB, argon2: true)
36
-
37
- You can transparently migrate bcrypt password hashes to argon2
38
- password hashes whenever a user successfully uses their password
39
- by using the argon2 feature in combination with the
40
- update_password_hash feature.
41
-
42
- = Other Improvements
43
-
44
- * Unnecessary queries to determine whether the new password matches
45
- a previous password are now skipped when using the create_account
46
- or verify_account features with the disallow_password_reuse
47
- feature.
@@ -1,31 +0,0 @@
1
- = New Features
2
-
3
- * An :auth_class rodauth plugin option has been added, allowing a user
4
- to specify a specific Rodauth::Auth subclass to use, instead of
5
- always using a new subclass of Rodauth::Auth. This is designed for
6
- advanced configurations or other frameworks that build on top of
7
- Rodauth, which may want to customize the Rodauth::Auth subclasses to
8
- use.
9
-
10
- * Two additional configuration methods have been added for easier
11
- translatability, fixing issues where English text was hardcoded:
12
-
13
- * same_as_current_login_message (change_login feature)
14
- * contains_null_byte_message (login_password_requirements_base
15
- feature)
16
-
17
- = Other Improvements
18
-
19
- * Loading the rodauth plugin multiple times in the same application
20
- with different blocks now works better. The same context is now
21
- shared between the blocks, so you can load features in one block
22
- and call configuration methods added by the feature in the other
23
- block. Previously, you could only call configuration methods in
24
- the block that added the feature, and enabling a feature in a
25
- block that was already enabled in a previous block did not allow
26
- the use of configuration methods related to the feature.
27
-
28
- * Passing a block when loading the rodauth plugin is now optional.
29
-
30
- * The autocomplete attribute on the reset password form now uses
31
- new-password instead of current-password.
@@ -1,17 +0,0 @@
1
- = New Features
2
-
3
- * The following configuration methods have been added to the
4
- active_sessions feature:
5
-
6
- * active_sessions_insert_hash
7
- * active_sessions_key
8
- * active_sessions_update_hash
9
- * update_current_session?
10
-
11
- These methods allow you to control what gets inserted and
12
- updated into the active_sessions_table, and to control
13
- whether to perform updates.
14
-
15
- = Other Improvements
16
-
17
- * A typo was fixed in the default unlock account email.
@@ -1,19 +0,0 @@
1
- = New Features
2
-
3
- * A set_error_reason configuration method has been added. This method
4
- is called whenever a error occurs in Rodauth, with a symbol
5
- describing the error. The default implementation of this method does
6
- nothing, it has been added to make it easier for Rodauth users to
7
- implement custom handling for specific error types. See the Rodauth
8
- documentation for this method to see the list of symbols this method
9
- can be called with.
10
-
11
- = Other Improvements
12
-
13
- * When using active_sessions and jwt_refresh together, and allowing for
14
- expired JWTs when refreshing, you can now call
15
- rodauth.check_active_session before r.rodauth. Previously, this
16
- did not work, and you had to call rodauth.check_active_session
17
- after r.rodauth.
18
-
19
- * The default templates now also support Bootstrap 5.
@@ -1,17 +0,0 @@
1
- = New Features
2
-
3
- * A remembered_session_id method has been added for getting the
4
- account id from a valid remember token, without modifying the
5
- session to log the account in.
6
-
7
- = Other Improvements
8
-
9
- * The jwt_refresh feature's support for allowing refresh with
10
- an expired access token now works even if the Rodauth
11
- configuration uses an incorrect prefix.
12
-
13
- * The internal account_in_unverified_grace_period? method now
14
- returns false if an account has not been loaded and the
15
- session has not been logged in. Previously, calling this
16
- method in such cases would result in an exception being
17
- raised.