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,61 +0,0 @@
1
- = Documentation for Recovery Codes Feature
2
-
3
- The recovery codes feature allows multifactor authentication via single use recovery
4
- codes. It is usually used as a backup if other multifactor authentication methods are
5
- not available or have been locked out, but can be used by itself. It allows
6
- users to view authentication recovery codes as well as regenerate recovery codes.
7
-
8
- Access to recovery codes is limited to authenticated sessions only, so users should
9
- be recommended to securely store/preserve a subset of these codes prior to any chance
10
- of them being required due to a missing / lost device.
11
-
12
- == Auth Value Methods
13
-
14
- add_recovery_codes_redirect :: Where to redirect to add recovery codes if recovery codes are the primary multifactor authentication and have not been setup yet.
15
- add_recovery_codes_button :: Text to use for button on the form to add recovery codes.
16
- add_recovery_codes_error_flash :: The flash error to show when adding recovery codes.
17
- add_recovery_codes_heading :: Text to use for heading above the form to add recovery codes.
18
- add_recovery_codes_page_title :: The page title to use on the add recovery codes form.
19
- add_recovery_codes_param :: The parameter name to use for adding recovery codes.
20
- auto_add_recovery_codes? :: Whether to automatically add recovery codes (or any missing recovery codes) when enabling otp, webauthn, or sms authentication (false by default).
21
- auto_remove_recovery_codes? :: Whether to automatically remove recovery codes when disabling otp, webauthn, or sms authentication and not having one of the other two authentication methods enabled (false by default).
22
- invalid_recovery_code_error_flash :: The flash error to show when an invalid recovery code is used.
23
- invalid_recovery_code_message :: The error message to show when an invalid recovery code is used.
24
- recovery_auth_additional_form_tags :: HTML fragment containing additional form tags when authenticating via a recovery code.
25
- recovery_auth_button :: The text to use for the button when authenticating via a recovery code.
26
- recovery_auth_link_text :: The text to use for the link from the multifactor auth page.
27
- recovery_auth_page_title :: The page title to use on the form to authenticate via a recovery code.
28
- recovery_auth_redirect :: Where to redirect after authenticating via an recovery code.
29
- recovery_auth_route :: The route to the recovery code authentication action. Defaults to +recovery-auth+.
30
- recovery_codes_added_notice_flash :: The flash notice to show when recovery codes were added.
31
- recovery_codes_additional_form_tags :: HTML fragment containing additional form tags when adding recovery codes.
32
- recovery_codes_column :: The column in the +recovery_codes_table+ containing the recovery code.
33
- recovery_codes_id_column :: The column in the +recovery_codes_table+ containing the account id.
34
- recovery_codes_label :: The label for recovery codes.
35
- recovery_codes_limit :: The number of recovery codes to setup.
36
- recovery_codes_link_text :: The text to use for the setup link from the multifactor manage page.
37
- recovery_codes_page_title :: The page title to use on the form to view recovery codes.
38
- recovery_codes_param :: The parameter name for the recovery code.
39
- recovery_codes_primary? :: Whether recovery codes are a primary multifactor authentication type. If not, they cannot be setup unless multifactor authentication is already setup.
40
- recovery_codes_route :: The route to the view recovery codes action. Defaults to +recovery-codes+.
41
- recovery_codes_table :: The table storing the recovery codes.
42
- view_recovery_codes_button :: Text for the button to view recovery codes.
43
- view_recovery_codes_error_flash :: The flash error to show when viewing recovery codes was not successful.
44
-
45
- == Auth Methods
46
-
47
- add_recovery_code :: Add a recovery code for the given account.
48
- add_recovery_codes_view :: The HTML to use for the add recovery codes form.
49
- after_add_recovery_codes :: Run arbitrary code after adding recovery codes.
50
- before_add_recovery_codes :: Run arbitrary code before adding recovery codes.
51
- before_recovery_auth :: Run arbitrary code before recovery code authentication.
52
- before_recovery_auth_route :: Run arbitrary code before handling recovery code authentication route.
53
- before_recovery_codes_route :: Run arbitrary code before handling view/add recovery codes route.
54
- before_view_recovery_codes :: Run arbitrary code before viewing recovery codes.
55
- can_add_recovery_codes? :: Whether the current account can add more recovery codes.
56
- new_recovery_code :: A new recovery code to insert into the recovery codes table.
57
- recovery_auth_view :: The HTML to use for the form to authenticate via a recovery code.
58
- recovery_code_match?(code) :: Whether the given code matches any of the existing recovery_codes.
59
- recovery_codes :: An array containing all valid recovery codes for the current account.
60
- recovery_codes_available? :: Whether authentication via recovery codes is ready for use.
61
- recovery_codes_view :: The HTML to use for the form to view recovery codes.
@@ -1,443 +0,0 @@
1
- = Highlights
2
-
3
- * Two factor authentication support via TOTP, SMS, and recovery codes
4
- * Support for any database supported by Sequel
5
- * Full security support on PostgreSQL, MySQL, and MSSQL
6
- * Full support for all features via JSON APIs, using JWT tokens
7
- * Support for common IT security policies:
8
- * Password complexity checks
9
- * Disallowing reuse of recent passwords
10
- * Password expiration
11
- * Account expiration
12
- * Session expiration
13
- * Limiting accounts to a single session
14
-
15
- = Backwards Compatibility
16
-
17
- * Rodauth now defaults to skipping status checks on accounts unless
18
- the verify account or close account features are used. Previously,
19
- skip_status_checks? was false by default regardless of which
20
- features were in use.
21
-
22
- * Rodauth no longer uses Sequel::Models for accounts, all database
23
- access is done through Sequel datasets. Users should switch to
24
- using the db, accounts_table, and account_select configuration
25
- methods if needed. The account_model configuration method still
26
- exists for backwards compatibility, but it just warns and calls
27
- those methods.
28
-
29
- * The account_id_value configuration method has been renamed to
30
- account_id.
31
-
32
- * The account_id and account_status_id configuration methods have
33
- been renamed to account_id_column and account_status_column. This
34
- is more consistent with other features, which use *_column for
35
- column names.
36
-
37
- * Before hooks (e.g. before_login) are executed before actions that
38
- change state. Before route hooks (e.g. before_login_route) have
39
- been added and are now called in the same place as the previous
40
- before hooks.
41
-
42
- * Rodauth now uses flash errors instead of flash notices if the
43
- message is not specifically a success message. For example,
44
- if a login is required and the user is redirected to a login
45
- page, a flash error is used instead of a flash notice.
46
-
47
- * Field errors are now stored in the rodauth object instead of
48
- instance variables in the Roda scope. This will affect you if you
49
- were doing custom overrides of Rodauth's templates and were
50
- expecting errors in instance variables. You can now retrieve a
51
- field error using something like rodauth.field_error('login'), where
52
- the argument is the related parameter name.
53
-
54
- * Rodauth now requires bcrypt by default. If you are not using
55
- bcrypt for authentication, you should set the following in your
56
- Rodauth configuration:
57
-
58
- require_bcrypt? false
59
-
60
- * Rodauth now requires mail by default if using the lockout, reset
61
- password, or verify account features. If you are using a custom
62
- mail library, you should set the following in your Rodauth
63
- configuration:
64
-
65
- require_mail? false
66
-
67
- * Rodauth now asks for the current password by default on all
68
- account modification forms (such as change password). You can
69
- disable this by setting modifications_require_password? to false.
70
-
71
- * In the lockout feature, unlock_account_autologin? is now true by
72
- default. Previously, it was false by default, which left open a
73
- persistent denial of service attack if the account could be locked
74
- out between when the account was unlocked and when the user could
75
- login again.
76
-
77
- You can now set unlock_account_requires_password? to true if you
78
- want to check for the current password when unlocking the account.
79
- However, if you are enabling password resets, this doesn't add
80
- any security as anyone controlling the email address could reset
81
- their password before unlocking the account.
82
-
83
- * Rodauth now requires that logins are valid email addresses and at
84
- least 3 or more characters by default. You can set
85
- require_email_address_logins? to false to not require email
86
- address logins, and login_minimum_length to set the minimum
87
- length for logins. You can also have custom login requirement
88
- checks by overriding login_meets_requirements?.
89
-
90
- * Changing and resetting passwords now checks that the new password
91
- is not the same as the existing password. Similarly, changing
92
- logins now checks that the new login is not the same as the
93
- existing login.
94
-
95
- * create_account_autologin? is now true by default unless using the
96
- verify_account feature, and verify_account_autologin? is now
97
- true by default.
98
-
99
- * Rodauth features are now stored under lib/rodauth/features instead
100
- of under lib/roda/plugins/rodauth. Additionally, Rodauth features
101
- should now go under the Rodauth namespace instead of the
102
- Roda::RodaPlugins::Rodauth namespace. Also, Rodauth's internal APIs
103
- have changed significantly to make it easier to create features.
104
-
105
- Anyone using external Rodauth features needs to update them to
106
- work with the new path structure, namespacing, and APIs.
107
-
108
- * The ability to override specific routes in the routing tree has
109
- been removed from Rodauth. Previously, you could use configuration
110
- methods such as login_post_route to override Rodauth's handling of
111
- POST /login. These methods no longer exist. Instead of using them,
112
- you should just override the appropriate route in your routing tree
113
- before calling r.rodauth.
114
-
115
- * Rodauth now requires securerandom on initialization. Previously,
116
- it did not require securerandom unless/until it was needed. As
117
- all rack session handlers require securerandom, and all supported
118
- ruby versions support securerandom, this should only affect you if
119
- you are using a custom session handler that does not use
120
- securerandom and your ruby implementation does not support
121
- securerandom.
122
-
123
- * Many Rodauth::Auth methods have been made private. Previously most
124
- methods were public as the internal routing blocks were evaluated
125
- in the Roda scope instead of the context of the Rodauth::Auth
126
- object.
127
-
128
- Additionally, if the feature defines a private method but you
129
- override it with a configuration method, the overridden method now
130
- remains private.
131
-
132
- * The password confirmation part of the remember feature has been
133
- split off into a separate confirm password feature with its own
134
- route, and most of the configuration method names have changed to
135
- reflect this.
136
-
137
- * The routes to request an account unlock, request a password reset,
138
- and resend the verify account email have been split into their own
139
- routes, instead of using the same route names and handling requests
140
- differently based on whether certain parameters were submitted.
141
-
142
- * Per-request route names are no longer supported due to an
143
- optimization. If you really need per-request route names, please
144
- open an issue and they can be brought back as an option.
145
-
146
- * Support for Roda < 2.6 has been dropped.
147
-
148
- = New Features
149
-
150
- * An OTP feature has been added for 2nd factor authentication via TOTP
151
- (Time-Based One-Time Password, RFC 6238). This allows TOTP setup,
152
- including displaying a QR code that can be scanned via a mobile
153
- phone, authentication via TOTP authentication codes, and disabling
154
- of TOTP authentication.
155
-
156
- * An SMS codes feature has been added for backup 2nd factor
157
- authentication via authentication codes sent in SMS messages. This
158
- supports registering a mobile phone number, confirming that you can
159
- receive authentication codes on the mobile phone number, requesting
160
- an SMS authentication code, input of the SMS authentication code,
161
- and disabling of SMS authentication.
162
-
163
- As ruby has many different SMS libraries, and robust SMS gateways
164
- generally require payments, Rodauth does not actually send the
165
- SMS messages itself, any user using the SMS codes feature needs to
166
- use the sms_send configuration method:
167
-
168
- sms_send do |phone_number, message|
169
- SomeSMSLibrary.send(phone_number, message)
170
- end
171
-
172
- * A recovery codes feature has been added for backup 2nd factor
173
- authentication via single-use account recovery codes. This supports
174
- viewing existing recovery codes, as well as generating additional
175
- recovery codes.
176
-
177
- * A JWT feature has been added, which adds JSON API support for all
178
- features that ship with Rodauth. By default, authentication data
179
- is stored in JWT tokens that are passed via the Authorization
180
- headers in the request and response.
181
-
182
- A POST-only JSON API is used, where submitted parameters should
183
- use the same names as the browser would use, all of which are
184
- configurable using Rodauth's configuration methods. By default,
185
- unsuccessful requests receive a 400 status code with a JSON
186
- object body with "error" and possibly "field-error" entries,
187
- and successful requests receive a 200 status code with an empty
188
- JSON object body.
189
-
190
- * A password complexity feature has been added for configurable
191
- password complexity checks, such as:
192
-
193
- * Contains characters in multiple character groups (default 3),
194
- unless the password is over a given length (default 11).
195
-
196
- * Does not contain common character or number sequences such as
197
- qwerty and 123.
198
-
199
- * Does not contain a certain number of repeating characters
200
- (default 3).
201
-
202
- * Does not contain a dictionary word, after stripping of numbers
203
- from the start and end of the password, and replacing common
204
- character substitutions (0 for o, $ for s).
205
-
206
- * A disallow password reuse feature has been added, which stores
207
- previous password hashes in addition to current passwords hashes,
208
- and does not allow a user to reuse a recent password (by default,
209
- any of their last 6).
210
-
211
- Previous password hashes are stored with the same security as the
212
- current password hash, so by default on PostgreSQL, MySQL, and
213
- Microsoft SQL Server, the application's database account does not
214
- have access to read them and must use database functions to
215
- retrieve the salts, compute hashes, and check if the hashes match.
216
-
217
- * A password expiration feature has been added, which requires that
218
- users change their password after a given amount of time (default
219
- is 90 days). It also supports not allowing password changes
220
- until a given amount of time after the last password change, to
221
- prevent users from quickly rotating their password back to their
222
- original password if disallowing password reuse.
223
-
224
- By default, passwords are only checked for expiration on login.
225
- If you want to check passwords on every access, you can use:
226
-
227
- rodauth.require_current_password
228
-
229
- at the appropriate point in your routing block. If a password
230
- has expired, the user will be redirected to the change password
231
- form.
232
-
233
- * An account expiration feature has been added, which disallows
234
- access to accounts after an amount of time since last login or
235
- activity. The default is to only track login times, and expire
236
- accounts based on their last login time. However, if you allow
237
- long running sessions, this may not provide an accurate picture
238
- of the last time the account was used. If you want to expire
239
- accounts based on last activity, you should set
240
- expire_account_on_last_activity? to true and use:
241
-
242
- rodauth.update_last_activity
243
-
244
- at the appropriate place in your routing block. This method
245
- is fairly expensive as it requires database access every time
246
- it is called.
247
-
248
- * A single session feature has been added, which limits each
249
- account to a single logged in session. Upon any login to
250
- an account, any previous session will no longer be valid. To
251
- make sure that this is enforced, you need to use:
252
-
253
- rodauth.check_single_session
254
-
255
- at the appropriate place in your routing block. This method
256
- is fairly expensive as it requires database access every time
257
- it is called.
258
-
259
- * A session expiration feature has been added, which can
260
- automatically expire sessions based on inactivity (default
261
- 30 minutes) and max lifetime (default 1 day) checks. To make
262
- sure that session expiration is enforced, you need to use:
263
-
264
- rodauth.check_session_expiration
265
-
266
- at the appropriate place in your routing block.
267
-
268
- * A password grace period feature has been added, which makes it
269
- so passwords are not needed for account changes if the password
270
- has been entered recently (default 5 minutes).
271
-
272
- * A verify account grace period feature has been added, which
273
- automatically logs accounts in on account creation, and allows
274
- them to login without verification for a period of time after
275
- creation (default 1 day). After the time period has expired,
276
- the account cannot log in until it has been verified.
277
-
278
- * A verify change login feature has been added, which requires
279
- that accounts that change logins reverify they have access to the
280
- new email address. This depends on the verify account grace
281
- period feature, and allows them to continue to use the account
282
- during the grace period, but after the grace period has expired,
283
- they can no longer log in until the account has been reverified.
284
-
285
- = Other Improvements
286
-
287
- * All of Rodauth's features should now work on any database that
288
- Sequel supports, and Rodauth is fully tested on PostgreSQL, MySQL,
289
- SQLite, and Microsoft SQL Server. Rodauth's full security support,
290
- which prevents the application database account from accessing
291
- password hashes, is fully tested on PostgreSQL, MySQL, and Microsoft
292
- SQL Server.
293
-
294
- * r.rodauth is now O(1) instead of O(N) where N is the number of
295
- rodauth routes.
296
-
297
- * Rodauth now uses a timing-safe algorithm for all token comparisons,
298
- avoiding possible timing attacks on tokens.
299
-
300
- * Rodauth now supports rodauth.authenticated? method for checking if
301
- the user has been authenticated. If the user has setup two
302
- factor authentication, this checks that the user has been
303
- authenticated via two factors. rodauth.require_authentication has
304
- also been added, which redirects the user to the appropriate
305
- authentication page if they have not been authenticated.
306
-
307
- * All of Rodauth's routes for modifying accounts, such as change
308
- password, now require the user be authenticated via two factors if
309
- they have setup two factor authentication.
310
-
311
- * You can now disable login/password confirmation by setting
312
- require_login_confirmation? and require_password_confirmation? to
313
- false. This is useful when using the JSON API support, where
314
- confirmation checks would generally be done client side.
315
-
316
- * Rodauth now supports a set_deadline_values? method for whether to
317
- set deadline values for tokens explicitly on a per-request basis,
318
- and *_interval configuration methods for how long to set such
319
- deadlines:
320
-
321
- set_deadline_values? true
322
- account_lockouts_deadline_interval :days=>2
323
- remember_deadline_interval :days=>60
324
- reset_password_deadline_interval :days=>7
325
-
326
- In order for this feature to work, Rodauth will load Sequel's
327
- date_arithmetic extension into the Sequel::Database object it
328
- uses. Note that set_deadline_values? defaults to true on MySQL,
329
- as MySQL does not support non-constant column defaults.
330
-
331
- * Rodauth supports more specific password requirement error
332
- messages, showing which specific password requirement was
333
- not met.
334
-
335
- * A reset_password_deadline_column method has been added for
336
- overriding the column name used to store the reset password
337
- deadlines.
338
-
339
- * Many configuration methods were added to the remember feature
340
- to control the parameter names and labels used. Configuration
341
- methods were also added for flash notices and errors in the
342
- remember feature.
343
-
344
- * rodauth.load_memory in the remember feature now checks that the
345
- account is still active. Previously, the remember feature could
346
- be used to log into inactive accounts if the accounts remember
347
- token was not correctly deleted. Additionally, any invalid
348
- tokens in cookies will result in the removal of the cookie.
349
-
350
- * When extend_remember_deadline? is used, rodauth.load_memory
351
- correctly extends the deadline to be based on the current
352
- timestamp, and also updates the cookie instead of just updating
353
- the database.
354
-
355
- * The close account feature now supports a delete_account_on_close?
356
- option, which will delete accounts after closing them.
357
-
358
- * The close account feature now works correctly when skipping
359
- status checks or when using account_password_hash_column.
360
-
361
- * A password_hash_id_column has been added for specifying the
362
- account id column in the password hash table.
363
-
364
- * A token separator configuration method has been, to override the
365
- default token separator of "_".
366
-
367
- * You can now add your own methods easily to the rodauth object
368
- via auth_class_eval:
369
-
370
- plugin :rodauth do
371
- enable :login, :logout
372
-
373
- after_login do
374
- log('logged in')
375
- end
376
-
377
- after_logout do
378
- log('logged out')
379
- end
380
-
381
- auth_class_eval do
382
- def log(msg)
383
- LOGGER.info("#{account[:email]} #{msg}")
384
- end
385
- end
386
- end
387
-
388
- The auth_class_eval block is evaluated in the context of the
389
- Rodauth::Auth class that the rodauth plugin builds. Methods you
390
- define in this block are then callable on the rodauth object
391
- inside the routing tree block.
392
-
393
- * Rodauth now only allows requesting an account unlock if the
394
- account is currently locked out.
395
-
396
- * If an account is locked out during login, the appropriate error
397
- message is now displayed immediately, instead of waiting until the
398
- next request.
399
-
400
- * Rodauth now does better error handling in the lockout, reset
401
- password and verify account features. Previously, users may have
402
- received 404 errors when using invalid tokens in these features.
403
-
404
- * Rodauth now uses separate templates for shared form input fields,
405
- making it easier to override handling of individual fields
406
- without overriding entire templates.
407
-
408
- * Rodauth now supports authentication without database functions
409
- when using the recommended schema of storing password hashes
410
- in a separate table. Previously, if database functions were not
411
- used, Rodauth only supported storing password hashes in the same
412
- table as the accounts.
413
-
414
- * Creating the database authentication functions that Rodauth uses
415
- can now be done by requiring rodauth/migrations and calling the
416
- Rodauth.create_database_authentication_functions method with the
417
- appropriate Sequel::Database object.
418
-
419
- * You no longer need to call super() in before and after hooks.
420
-
421
- * Rodauth now handles race conditions related to unique constraint
422
- violations where it is possible to do so. In the cases where it
423
- is not possible to handle the race condition correctly, an
424
- exception will still be raised.
425
-
426
- * Non-integer account ids now work correctly in tokens.
427
-
428
- * Rodauth now uses frozen string literals by default on ruby 2.3
429
-
430
- * The random_key and password_hash_cost default methods have been
431
- made faster by using conditionals to define separate methods,
432
- instead of conditionals inside the methods.
433
-
434
- * As Rodauth can now be used in JSON API only mode, the gem
435
- dependencies are limited to roda and sequel. When used outside
436
- of JSON API only mode, it also requires tilt and rack_csrf.
437
-
438
- * Rodauth.version has been added for getting the version of
439
- Rodauth in use.
440
-
441
- * Travis-CI is now used for continuous integration testing on ruby
442
- 1.8.7-2.3.0, JRuby 1.7 (1.8 and 1.9 modes), and JRuby 9.0, using
443
- PostgreSQL, MySQL, and SQLite.
@@ -1,8 +0,0 @@
1
- = New Features
2
-
3
- * The rodauth plugin now supports :csrf=>false and :flash=>false
4
- options. This will make it so it no longer depends on the csrf
5
- or flash plugins, which is useful when the csrf and flash
6
- functionality is provided via a different approach, such as
7
- when rodauth is being used inside middleware in a Rails
8
- application with the roda-rails library.
@@ -1,80 +0,0 @@
1
- = New Features
2
-
3
- * A verify_login_change feature has been added. This is designed
4
- as a replacement for the previous verify_change_login feature,
5
- which was problematic as it could result in a user being unable
6
- to access their account if they used an incorrect email when
7
- changing their login.
8
-
9
- The verify_login_change feature does not change the user's login
10
- until after the user has confirmed that they can receive email
11
- using the new login.
12
-
13
- The verify_login_change feature requires an additional database
14
- table to store information on login changes, so it is not a
15
- drop in replacement for the verify_change_login feature. However,
16
- it is recommended that all users of verify_change_login switch
17
- to verify_login_change.
18
-
19
- * If using the reset_password feature, there is now a link on the
20
- login page to a page that will allow you to request a password
21
- reset. Previously you had to attempt to login with the account
22
- in order to request a password reset.
23
-
24
- * If using the verify_account feature, there is now a link on the
25
- login page to a page that will allow you to request that the
26
- account verification email be resent. Previously you had to
27
- attempt to login with the account or attempt to create a new
28
- account with the same login in order to get an account verification
29
- email resent.
30
-
31
- * If using the reset_password feature, there is now a
32
- login_failed_reset_password_request_form configuration method for
33
- customizing the HTML used for the request password reset form shown
34
- when there is a login failure.
35
-
36
- = Improvements
37
-
38
- * When using the verify_account_grace_period feature, attempting to
39
- create a new account using the same login as an existing
40
- unverified account now correctly offers the ability to resend the
41
- account verification email.
42
-
43
- * The precompile_rodauth_templates method now works with the
44
- reset_password feature.
45
-
46
- * When attempting to reopen a rodauth configuration in a subclass
47
- of the Roda class that created the rodauth configuration, a
48
- subclass of the rodauth configuration is now automatically
49
- created. This makes it so changes to the rodauth configuration
50
- in the Roda subclass no longer affect the rodauth configuration
51
- of the superclass.
52
-
53
- * The FeatureConfiguration instances for each feature are now
54
- assigned to constants, making inspect output more descriptive.
55
-
56
- * An internals guide has been added, which explains the
57
- metaprogramming used to implement Rodauth.
58
-
59
- = Backwards Compatibility
60
-
61
- * Any external features should start providing two arguments to
62
- Feature.define, with the second argument being the constant
63
- name to use. So instead of:
64
-
65
- module Rodauth
66
- Foo = Feature.define(:foo) do
67
- # ...
68
- end
69
- end
70
-
71
- switch to:
72
-
73
- module Rodauth
74
- Feature.define(:foo, :Foo) do
75
- # ...
76
- end
77
- end
78
-
79
- This will ensure that the related FeatureConfiguration instance
80
- is assigned to a constant.
@@ -1,32 +0,0 @@
1
- = New Features
2
-
3
- * A rodauth.valid_jwt? method has been added, allowing for easy
4
- checking of whether a valid JWT has been submitted. If a valid
5
- JWT has been submitted, the contents of the JWT will be available
6
- in rodauth.session.
7
-
8
- * If using the jwt feature with json_response_custom_error_status?
9
- set to true, and going to a page that requires a login when not
10
- logged in, a 401 error status will now be used instead of a 400
11
- error status. You can customize this status using the new
12
- login_required_error_status configuration method.
13
-
14
- = Improvements
15
-
16
- * Time differences between the database server and the application
17
- server are now handled slightly better in the password_expiration
18
- feature. This mostly affects testing, where sometimes tests would
19
- previously fail if the database server time was ahead of the
20
- application server time when testing whether a password change was
21
- allowed.
22
-
23
- * Some methods that were private by default, but public if overridden,
24
- are now public by default. These include update_session and
25
- only_json? in the base feature, and json_request?, jwt_secret, and
26
- use_jwt? in the jwt feature.
27
-
28
- = Backwards Compatibility
29
-
30
- * The private jwt_payload method in the jwt feature now returns false
31
- instead of redirecting on error. This should not affect the
32
- application unless the method was being called explicitly.