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
data/doc/jwt_refresh.rdoc DELETED
@@ -1,58 +0,0 @@
1
- = Documentation for JWT Refresh Feature
2
-
3
- The jwt_refresh feature adds support for a database-backed JWT refresh token,
4
- setting a short lifetime on JWT access tokens.
5
-
6
- When this feature is used, the access and refresh token are provided
7
- at login in the response body (the access token is still provided in the Authorization
8
- header), and for any subsequent POST to <tt>/jwt-refresh</tt>.
9
-
10
- Note that using the refresh token invalidates the token and creates
11
- a new access token with an updated lifetime. However, it does not invalidate
12
- older access tokens. Older access tokens remain valid until they expire. You
13
- can use the active_sessions feature if you want previous access tokens to be invalid
14
- as soon as the refresh token is used.
15
-
16
- You can have multiple active refresh tokens active at a time, since each browser session
17
- will generally use a separate refresh token. If you would like to revoke a refresh token
18
- when logging out, provide the refresh token when submitting the JSON request to logout.
19
- If you would like to remove all refresh tokens for the account when logging out, provide
20
- a value of <tt>all</tt> as the token value.
21
-
22
- When using the refresh token, you must provide a valid access token, as that contains
23
- information about the current session, which is used to create the new access token.
24
- If you change the +allow_refresh_with_expired_jwt_access_token?+ setting to +true+,
25
- an expired but otherwise valid access token will be accepted, and Rodauth will check
26
- that the access token was issued in the same session as the refresh token.
27
-
28
- This feature depends on the jwt feature.
29
-
30
- == Auth Value Methods
31
-
32
- allow_refresh_with_expired_jwt_access_token? :: Whether refreshing should be allowed with an expired access token. Default is +false+. You must set an +hmac_secret+ if setting this value to +true+.
33
- expired_jwt_access_token_status :: The HTTP status code to use when a access token (JWT) is expired is submitted in the Authorization header. Default is 400 for backwards compatibility, and it is recommended to set it to 401.
34
- expired_jwt_access_token_message :: The error message to use when a access token (JWT) is expired is submitted in the Authorization header.
35
- jwt_access_token_key :: Name of the key in the response json holding the access token. Default is +access_token+.
36
- jwt_access_token_not_before_period :: How many seconds before the current time will the jwt be considered valid (to account for inaccurate clocks). Default is 5.
37
- jwt_access_token_period :: Validity of an access token in seconds, default is 1800 (30 minutes).
38
- jwt_refresh_route :: The route to the login action. Defaults to <tt>jwt-refresh</tt>.
39
- jwt_refresh_invalid_token_message :: Error message when the provided refresh token is non existent, invalid or expired.
40
- jwt_refresh_token_account_id_column :: The column name in the +jwt_refresh_token_table+ storing the account id, should be a foreign key referencing the accounts table.
41
- jwt_refresh_token_data_session_key :: The key in the session hash storing random data, for access checking during refresh if +allow_refresh_with_expired_jwt_access_token?+ is set.
42
- jwt_refresh_token_deadline_column :: The column name in the +jwt_refresh_token_table+ storing the deadline after which the refresh token will no longer be valid.
43
- jwt_refresh_token_deadline_interval :: Validity of a refresh token. Default is 14 days.
44
- jwt_refresh_token_hmac_session_key :: The key in the session hash storing the hmac, for access checking during refresh if +allow_refresh_with_expired_jwt_access_token?+ is set.
45
- jwt_refresh_token_id_column :: The column name in the refresh token keys table storing the id of each token (the primary key of the table).
46
- jwt_refresh_token_key :: Name of the key in the response json holding the refresh token. Default is +refresh_token+.
47
- jwt_refresh_token_key_column :: The column name in the +jwt_refresh_token_table+ holding the refresh token key value.
48
- jwt_refresh_token_key_param :: Name of parameter in which the refresh token is provided when requesting a new token. Default is +refresh_token+.
49
- jwt_refresh_token_table :: Name of the table holding refresh token keys.
50
- jwt_refresh_without_access_token_message :: Error message when trying to refresh with providing an access token.
51
- jwt_refresh_without_access_token_status :: The HTTP status code to use when trying to refresh without providing an access token.
52
-
53
- == Auth Methods
54
-
55
- account_from_refresh_token(token) :: Returns the account hash for the given refresh token.
56
- after_refresh_token :: Hooks for specific processing once the refresh token has been set.
57
- before_jwt_refresh_route :: Run arbitrary code before handling a jwt_refresh route.
58
- before_refresh_token :: Hooks for specific processing before the refresh token is computed.
data/doc/lockout.rdoc DELETED
@@ -1,73 +0,0 @@
1
- = Documentation for Lockout Feature
2
-
3
- The lockout feature implements bruteforce protection for accounts.
4
- It depends on the login feature. If a user fails to login due to
5
- a password error more than a given number of times, their account
6
- gets locked out, and they are given an option to request an account
7
- unlock via an email sent to them.
8
-
9
- == Auth Value Methods
10
-
11
- account_lockouts_deadline_column :: The deadline column in the +account_lockouts_table+, containing the timestamp until which the account is locked out.
12
- account_lockouts_deadline_interval :: The amount of time for which to lock out accounts, 1 day by default. Only used if +set_deadline_values?+ is true.
13
- account_lockouts_email_last_sent_column :: The email last sent column in the +account_lockouts_table+. Set to nil to always send an unlock account email when requested.
14
- account_lockouts_id_column :: The id column in the +account_lockouts_table+, should be a foreign key referencing the accounts table.
15
- account_lockouts_key_column :: The unlock key column in the +account_lockouts_table+.
16
- account_lockouts_table :: The table containing account lockout information.
17
- account_login_failures_id_column :: The id column in the +account_login_failures_table+, should be a foreign key referencing the accounts table.
18
- account_login_failures_number_column :: The column in the +account_login_failures_table+ containing the number of login failures for the account.
19
- account_login_failures_table :: The table containing number of login failures per account.
20
- login_lockout_error_flash :: The flash error to show if there if the account is or becomes locked out after a login attempt.
21
- max_invalid_logins :: The maximum number of failed logins before account lockout. As this feature is just designed for bruteforce protection, this defaults to 100.
22
- no_matching_unlock_account_key_error_flash :: The flash error message to show if attempting to access the unlock account form with an invalid key.
23
- unlock_account_additional_form_tags :: HTML fragment with additional form tags to use on the unlock account form.
24
- unlock_account_autologin? :: Whether to autologin users after successful account unlock. This defaults to true, as otherwise an attacker can prevent an account from logging in by continually locking out their account.
25
- unlock_account_button :: The text to use on the unlock account button.
26
- unlock_account_email_recently_sent_error_flash :: The flash error to show if not sending an unlock account email because another was sent recently.
27
- unlock_account_email_recently_sent_redirect :: Where to redirect after not sending an unlock account email because another was sent recently.
28
- unlock_account_email_subject :: The subject to use for the unlock account email.
29
- unlock_account_error_flash :: The flash error to display upon unsuccessful account unlock.
30
- unlock_account_explanatory_text :: The text to display above the button to unlock an account.
31
- unlock_account_key_param :: The parameter name to use for the unlock account key.
32
- unlock_account_notice_flash :: The flash notice to display upon successful account unlock.
33
- unlock_account_page_title :: The page title to use on the unlock account form.
34
- unlock_account_redirect :: Where to redirect after successful account unlock.
35
- unlock_account_request_additional_form_tags :: HTML fragment with additional form tags to use on the form to request an account unlock.
36
- unlock_account_request_button :: The text to use on the unlock account request button.
37
- unlock_account_request_explanatory_text :: The text to display above the button to request an account unlock.
38
- unlock_account_request_notice_flash :: The flash notice to display upon successful sending of the unlock account email.
39
- unlock_account_request_page_title :: The page title to use on the unlock account request form.
40
- unlock_account_request_redirect :: Where to redirect after the account unlock email is sent.
41
- unlock_account_request_route :: The route to the unlock account request action. Defaults to +unlock-account-request+.
42
- unlock_account_requires_password? :: Whether a password is required when unlocking accounts, false by default. May want to set to true if not allowing password resets.
43
- unlock_account_route :: The route to the unlock account action. Defaults to +unlock-account+.
44
- unlock_account_session_key :: The key in the session to hold the unlock account key temporarily.
45
- unlock_account_skip_resend_email_within :: The number of seconds before sending another unlock account email, if +account_lockouts_email_last_sent_column+ is set.
46
-
47
- == Auth Methods
48
-
49
- account_from_unlock_key(key) :: Retrieve the account using the given verify account key, or return nil if no account matches.
50
- after_account_lockout :: Run arbitrary code after an account has been locked out.
51
- after_unlock_account :: Run arbitrary code after a successful account unlock.
52
- after_unlock_account_request :: Run arbitrary code after a successful account unlock request.
53
- before_unlock_account :: Run arbitrary code before unlocking an account.
54
- before_unlock_account_request :: Run arbitrary code before sending an account unlock email.
55
- before_unlock_account_request_route :: Run arbitrary code before handling an account unlock request route.
56
- before_unlock_account_route :: Run arbitrary code before handling an unlock account route.
57
- clear_invalid_login_attempts :: Clear any stored login failures or lockouts for the current account.
58
- create_unlock_account_email :: A Mail::Message for the account unlock email to send.
59
- generate_unlock_account_key :: A random string to use for a new unlock account key.
60
- get_unlock_account_email_last_sent :: Get the last time an unlock account email is sent, or nil if there is no last sent time.
61
- get_unlock_account_key :: Retrieve the unlock account key for the current account.
62
- invalid_login_attempted :: Record an invalid login attempt, incrementing the number of login failures, and possibly locking out the account.
63
- locked_out? :: Whether the current account is locked out.
64
- send_unlock_account_email :: Send the account unlock email.
65
- set_unlock_account_email_last_sent :: Set the last time an unlock_account email is sent.
66
- unlock_account :: Unlock the account.
67
- unlock_account_email_body :: The body to use for the unlock account email.
68
- unlock_account_email_link :: The link to the unlock account form to include in the unlock account email.
69
- unlock_account_key :: The unlock account key for the current account.
70
- unlock_account_request_response :: Return a response after successfully requesting an account unlock. By default, redirects to +unlock_account_request_redirect+.
71
- unlock_account_request_view :: The HTML to use for the unlock account request form.
72
- unlock_account_response :: Return a response after successfully unlocking an account. By default, redirects to +unlock_account_redirect+.
73
- unlock_account_view :: The HTML to use for the unlock account form.
data/doc/login.rdoc DELETED
@@ -1,39 +0,0 @@
1
- = Documentation for Login Feature
2
-
3
- The login feature implements a login page. It's the most commonly
4
- used feature.
5
-
6
- In addition to the auth methods below, it provides a +login+ method that wraps
7
- +login_session+, running login hooks and redirecting to the configured
8
- location.
9
-
10
- rodauth.account #=> { id: 123, ... }
11
- rodauth.login('password') # login the current account
12
-
13
- == Auth Value Methods
14
-
15
- login_additional_form_tags :: HTML fragment containing additional form tags to use on the login form.
16
- login_button :: The text to use for the login button.
17
- login_error_flash :: The flash error to show for an unsuccessful login.
18
- login_error_status :: The response status to use when using an invalid login or password to login, 401 by default.
19
- login_form_footer_links :: An array of entries for links to show on the login page. Each entry is an array of three elements, sort order (integer), link href, and link text.
20
- login_form_footer_links_heading :: A heading to show before the login form footer links.
21
- login_notice_flash :: The flash notice to show after successful login.
22
- login_page_title :: The page title to use on the login form.
23
- login_redirect :: Where to redirect after a sucessful login.
24
- login_redirect_session_key :: The key in the session hash storing the location to redirect to after successful login.
25
- login_return_to_requested_location? :: Whether to redirect to the originally requested location after successful login when +require_login+ was used, false by default.
26
- login_route :: The route to the login action. Defaults to +login+.
27
- multi_phase_login_forms :: An array of entries for authentication methods that can be used to login when using multi phase login. Each entry is an array of three elements, sort order (integer), HTML, and method to call if this entry is the only authentication method available (or nil to not call a method).
28
- multi_phase_login_page_title :: The page title to use on the login form after login has been entered when using multi phase login.
29
- need_password_notice_flash :: The flash notice to show during multi phase login after the login has been entered, when requesting the password.
30
- use_multi_phase_login? :: Whether to ask for login first, and only ask for password after asking for the login, false by default unless an alternative login feature such as email_auth or webauthn_login is used.
31
-
32
- == Auth Methods
33
-
34
- before_login_route :: Run arbitrary code before handling a login route.
35
- login_form_footer :: A message to display after the login form.
36
- login_response :: Return a response after a successful login. By default, redirects to +login_redirect+ (or the requested location if +login_return_to_requested_location?+ is true).
37
- login_return_to_requested_location_path :: If +login_return_to_requested_location?+ is true, the path to use as the requested location. By default, uses the full path of the request for GET requests, and is nil for non-GET requests (in which case the default +login_redirect+ will be used).
38
- login_view :: The HTML to use for the login form.
39
- multi_phase_login_view :: The HTML to use for the login form after login has been entered when using multi phase login.
@@ -1,44 +0,0 @@
1
- = Documentation for Login Password Requirements Base Feature
2
-
3
- The login password requirements base feature is automatically loaded when you
4
- use a Rodauth feature that requires setting logins or passwords.
5
-
6
- == Auth Value Methods
7
-
8
- already_an_account_with_this_login_message :: The error message to display when there already exists an account with the same login.
9
- contains_null_byte_message :: The error message to display when the password contains a null byte (only used if parameters with null bytes are otherwise allowed).
10
- login_confirm_label :: The label to use for login confirmations.
11
- login_confirm_param :: The parameter name to use for login confirmations.
12
- login_does_not_meet_requirements_message :: The error message to display when the login does not meet the requirements you have set.
13
- login_email_regexp :: The regular expression used to validate whether login is a valid email address.
14
- login_maximum_bytes :: The maximum length for logins in bytes, 255 by default.
15
- login_maximum_length :: The maximum length for logins in characters, 255 by default.
16
- login_minimum_length :: The minimum length for logins in characters, 3 by default.
17
- login_not_valid_email_message :: The error message to display when login is not a valid email address.
18
- login_too_long_message :: The error message fragment to show if the login is too long.
19
- login_too_many_bytes_message :: The error message fragment to show if the login has too many bytes.
20
- login_too_short_message :: The error message fragment to show if the login is too short.
21
- logins_do_not_match_message :: The error message to display when login and login confirmation do not match.
22
- password_confirm_label :: The label to use for password confirmations.
23
- password_confirm_param :: The parameter name to use for password confirmations.
24
- password_does_not_meet_requirements_message :: The error message to display when the password does not meet the requirements you have set.
25
- password_hash_cost :: The cost to use for the password hash algorithm. This should be an integer when using bcrypt (the default), and a hash if using argon2 (supported by the argon2 feature).
26
- password_maximum_bytes :: The maximum length for passwords in bytes, nil by default for no limit. bcrypt only uses the first 72 bytes of the password when creating the password hash, so if you are using bcrypt as the password hash function, you may want to set this to 72.
27
- password_maximum_length :: The maximum length for passwords in characters, nil by default for no limit.
28
- password_minimum_length :: The minimum length for passwords in characters, 6 by default.
29
- password_too_long_message :: The error message fragment to show if the password is too long.
30
- password_too_many_bytes_message :: The error message fragment to show if the password is has too many bytes.
31
- password_too_short_message :: The error message fragment to show if the password is too short.
32
- passwords_do_not_match_message :: The error message to display when password and password confirmation do not match.
33
- require_email_address_logins? :: Whether logins need to be valid email addresses, true by default.
34
- require_login_confirmation? :: Whether login confirmations are required when changing logins or creating accounts. True by default if not verifying the account.
35
- require_password_confirmation? :: Whether password confirmations are required when changing/resetting passwords and creating accounts.
36
- same_as_existing_password_message :: The error message to display when a new password is the same as the existing password.
37
-
38
- == Auth Methods
39
-
40
- login_meets_requirements?(login) :: Whether the given login meets the requirements. By default, just checks that the login is a valid email address.
41
- login_valid_email?(login) :: Whether the login is a valid email address.
42
- password_hash(password) :: A hash of the given password.
43
- password_meets_requirements?(password) :: Whether the given password meets the requirements. Can be used to implement complexity requirements for passwords.
44
- set_password(password) :: Set the password for the current account to the given password.
data/doc/logout.rdoc DELETED
@@ -1,22 +0,0 @@
1
- = Documentation for Logout Feature
2
-
3
- The logout feature implements a logout button, which clears the session.
4
- It is the simplest feature.
5
-
6
- == Auth Value Methods
7
-
8
- logout_additional_form_tags :: HTML fragment containing additional form tags to use on the logout form.
9
- logout_button :: The text to use for the logout button.
10
- logout_notice_flash :: The flash notice to show after logout.
11
- logout_page_title :: The page title to use on the logout form.
12
- logout_redirect :: Where to redirect after a logout.
13
- logout_route :: The route to the logout action. Defaults to +logout+.
14
-
15
- == Auth Methods
16
-
17
- after_logout :: Run arbitrary code after logout.
18
- before_logout :: Run arbitrary code before logout.
19
- before_logout_route :: Run arbitrary code before handling a logout route.
20
- logout :: Log the user out, by default clearing the session.
21
- logout_response :: Return a response after a successful logout. By default, redirects to +logout_redirect+.
22
- logout_view :: The HTML to use for the logout form.
data/doc/otp.rdoc DELETED
@@ -1,93 +0,0 @@
1
- = Documentation for OTP Feature
2
-
3
- The otp feature implements multifactor authentication via time-based one-time
4
- passwords (TOTP). It supports setting up TOTP authentication, logging
5
- in with TOTP authentication codes, and disabling TOTP authentication.
6
-
7
- The otp feature requires the rotp and rqrcode gems.
8
-
9
- == Auth Value Methods
10
-
11
- otp_already_setup_error_flash :: The flash error to show if going to the OTP setup page when OTP is already setup.
12
- otp_already_setup_redirect :: Where to redirect if going to the OTP setup page when OTP has already been setup.
13
- otp_auth_additional_form_tags :: HTML fragment containing additional form tags to use on the OTP authentication form.
14
- otp_auth_button :: Text to use for button on OTP authentication form.
15
- otp_auth_error_flash :: The flash error to show if unable to authenticate via OTP.
16
- otp_auth_failures_limit :: The number of allowed OTP authentication failures before locking out.
17
- otp_auth_form_footer :: A footer to display at the bottom of the OTP authentication form.
18
- otp_auth_label :: The label for the OTP authentication code.
19
- otp_auth_link_text :: The text to use for the link from the multifactor auth page.
20
- otp_auth_page_title :: The page title to use on the OTP authentication form.
21
- otp_auth_param :: The parameter name for the OTP authentication code.
22
- otp_auth_route :: The route to the OTP authentication action. Defaults to +otp-auth+.
23
- otp_class :: The class to use for OTP authentication (default: ROTP::TOTP)
24
- otp_digits :: The number of digits to use in OTP authentication codes (rotp's default is 6).
25
- otp_disable_additional_form_tags :: HTML fragment containing additional form tags to use on the form to disable OTP authentication.
26
- otp_disable_button :: The text to use for button on the form to disable OTP authentication.
27
- otp_disable_error_flash :: The flash error to show if unable to disable OTP authentication.
28
- otp_disable_link_text :: The text to use for the disable link from the multifactor manage page.
29
- otp_disable_notice_flash :: The flash notice to show after disabling OTP authentication.
30
- otp_disable_page_title :: The page title to use on the OTP disable form.
31
- otp_disable_redirect :: Where to redirect after disabling OTP authentication.
32
- otp_disable_route :: The route to the OTP disable action. Defaults to +otp-disable+.
33
- otp_drift :: The number of seconds the client and server are allowed to drift apart. The default is 30. Can be set to nil to not allow drift.
34
- otp_interval :: The number of seconds in which to rotate TOTP auth codes (rotp's default is 30).
35
- otp_invalid_auth_code_message :: The error message to show when an invalid OTP authentication code is used.
36
- otp_invalid_secret_message :: The error message to show when an invalid OTP secret is submitted during OTP setup.
37
- otp_issuer :: The issuer to use in the OTP provisioning URL. Defaults to +domain+.
38
- otp_keys_column :: The column in the +otp_keys_table+ containing the OTP secret.
39
- otp_keys_failures_column :: The column in the +otp_keys_table+ containing the number of OTP authentication failures.
40
- otp_keys_id_column :: The column in the +otp_keys_table+ containing the account id.
41
- otp_keys_last_use_column :: The column in +otp_keys_table+ containing the last authentication timestamp.
42
- otp_keys_table :: The table name containing the OTP secrets.
43
- otp_keys_use_hmac? :: Whether to use HMACs for OTP keys. Defaults to whether +hmac_secret+ has been set. Should be set to false if adding +hmac_secret+ to Rodauth where the otp feature is already in use, as otherwise it will render existing OTP keys invalid.
44
- otp_lockout_error_flash :: The flash error show show when OTP authentication has been locked out due to numerous authentication failures.
45
- otp_lockout_redirect :: Where to redirect if going to OTP authentication page and OTP authentication has been locked out.
46
- otp_provisioning_uri_label :: The label used when displaying the OTP provisioning URI during OTP setup.
47
- otp_secret_label :: The label used when displaying the OTP secret during OTP setup.
48
- otp_setup_additional_form_tags :: HTML fragment containing additional form tags when setting up OTP authentication.
49
- otp_setup_button :: Text for the button when setting up OTP authentication.
50
- otp_setup_error_flash :: The flash error to show if OTP authentication setup was not successful.
51
- otp_setup_link_text :: The text to use for the setup link from the multifactor manage page.
52
- otp_setup_notice_flash :: The flash notice to show if OTP authentication setup was successful.
53
- otp_setup_page_title :: The page title to use on the form to setup OTP authentication.
54
- otp_setup_param :: The parameter name used for the OTP secret when setting up OTP authentication.
55
- otp_setup_raw_param :: The parameter name used for the raw OTP secret when setting up OTP authentication, when +otp_keys_use_hmac?+ is true.
56
- otp_setup_redirect :: Where to redirect after sucessful OTP authentication setup.
57
- otp_setup_route :: The route to the OTP setup action. Defaults to +otp-setup+.
58
-
59
- == Auth Methods
60
-
61
- after_otp_authentication_failure :: Run arbitrary code after OTP authentication failure.
62
- after_otp_disable :: Run arbitrary code after OTP authentication has been disabled.
63
- after_otp_setup :: Run arbitrary code after OTP authentication has been setup.
64
- before_otp_auth_route :: Run arbitrary code before handling an OTP authentication route.
65
- before_otp_authentication :: Run arbitrary code before OTP authentication.
66
- before_otp_disable :: Run arbitrary code before OTP authentication disabling.
67
- before_otp_disable_route :: Run arbitrary code before handling an OTP authentication disable route.
68
- before_otp_setup :: Run arbitrary code before OTP authentication setup.
69
- before_otp_setup_route :: Run arbitrary code before handling an OTP authentication setup route.
70
- otp :: The object used for verifying OTP authentication attempts.
71
- otp_add_key(secret) :: Add an OTP key for the current account with the given secret.
72
- otp_auth_view :: The HTML to use for the OTP authentication form.
73
- otp_available? :: Whether OTP authentication is ready for use.
74
- otp_disable_response :: Return a response after successfully disabling OTP . By default, redirects to +otp_disable_redirect+.
75
- otp_disable_view :: The HTML to use for the OTP disable form.
76
- otp_exists? :: Whether the current account has setup OTP.
77
- otp_key :: The stored OTP secret for the account.
78
- otp_last_use :: The last time OTP authentication was successful for the account.
79
- otp_locked_out? :: Whether the current account has been locked out of OTP authentication.
80
- otp_new_secret :: A new secret to use when setting up OTP.
81
- otp_provisioning_name :: The provisioning name to use during OTP setup, defaults to the account's email.
82
- otp_provisioning_uri :: The provisioning URI displayed during OTP setup.
83
- otp_qr_code :: The QR code containing the otp_provisioning_uri, by default an SVG image.
84
- otp_record_authentication_failure :: Record an OTP authentication failure.
85
- otp_remove :: Removes all stored OTP data for the current account.
86
- otp_remove_auth_failures :: Removes OTP authentication failures for the current account, used after successful multifactor authentication.
87
- otp_setup_response :: Return a response after successful OTP setup. By default, redirects to +otp_setup_redirect+.
88
- otp_setup_view :: The HTML to use for the form to setup OTP authentication.
89
- otp_tmp_key(secret) :: Set the secret to use for the temporary OTP key, during OTP setup.
90
- otp_update_last_use :: Update the last time OTP authentication was successful for the account. Return true if the authentication should be allowed, or false if it should not be allowed because the last authentication was too recent and indicates the possible reuse of a TOTP authentication code.
91
- otp_valid_code_for_old_secret :: Called when valid OTP authentication is performed using hmac_old_secret. This indicates the OTP needs to be rotated before support for the previous hmac secret value is removed. You can use this to track users who need their OTP rotated, and take appropriate action.
92
- otp_valid_code?(auth_code) :: Whether the given code is the currently valid OTP auth code for the account.
93
- otp_valid_key?(secret) :: Whether the given secret is a valid OTP secret.
@@ -1,30 +0,0 @@
1
- = Documentation for OTP Lockout Email Feature
2
-
3
- The otp_lockout_email feature emails users when:
4
-
5
- * TOTP authentication is locked out
6
- * TOTP authentication is unlocked
7
- * A TOTP unlock attempt has failed
8
-
9
- The otp_unlock_email feature depends on the otp_lockout and email_base features.
10
-
11
- == Auth Value Methods
12
-
13
- otp_locked_out_email_body :: Body to use for the email notifying user that TOTP authentication has been locked out.
14
- otp_locked_out_email_subject :: Subject to use for the email notifying user that TOTP authentication has been locked out.
15
- otp_unlock_failed_email_body :: Body to use for the email notifying user that there has been an unsuccessful attempt to unlock TOTP authentication.
16
- otp_unlock_failed_email_subject :: Subject to use for the email notifying user that there has been an unsuccessful attempt to unlock TOTP authentication.
17
- otp_unlocked_email_body :: Body to use for the email notifying user that TOTP authentication has been unlocked.
18
- otp_unlocked_email_subject :: Subject to use for the email notifying user that TOTP authentication has been unlocked.
19
- send_otp_locked_out_email? :: Whether to send an email when TOTP authentication is locked out.
20
- send_otp_unlock_failed_email? :: Whether to send an email when there has been an unsuccessful attempt to unlock TOTP authentication.
21
- send_otp_unlocked_email? :: Whether to send an email when TOTP authentication is unlocked.
22
-
23
- == Auth Methods
24
-
25
- create_otp_locked_out_email :: A Mail::Message for the email notifying user that TOTP authentication has been locked out.
26
- create_otp_unlock_failed_email :: A Mail::Message for the email notifying user that there has been an unsuccessful attempt to unlock TOTP authentication.
27
- create_otp_unlocked_email :: A Mail::Message for the email notifying user that TOTP authentication has been unlocked.
28
- send_otp_locked_out_email :: Send the email notifying user that TOTP authentication has been locked out.
29
- send_otp_unlock_failed_email :: Send the email notifying user that there has been an unsuccessful attempt to unlock TOTP authentication.
30
- send_otp_unlocked_email :: Send the email notifying user that TOTP authentication has been unlocked.
@@ -1,19 +0,0 @@
1
- = Documentation for OTP Modify Email Feature
2
-
3
- The otp_modify_email feature emails users when TOTP authentication is setup or disabled.
4
-
5
- The otp_modify_email feature depends on the otp and email_base features.
6
-
7
- == Auth Value Methods
8
-
9
- otp_disabled_email_body :: Body to use for the email notifying user that TOTP authentication has been disabled.
10
- otp_disabled_email_subject :: Subject to use for the email notifying user that TOTP authentication has been disabled.
11
- otp_setup_email_body :: Body to use for the email notifying user that TOTP authentication has been setup.
12
- otp_setup_email_subject :: Subject to use for the email notifying user that TOTP authentication has been setup.
13
-
14
- == Auth Methods
15
-
16
- create_otp_disabled_email :: A Mail::Message for the email notifying user that TOTP authentication has been disabled.
17
- create_otp_setup_email :: A Mail::Message for the email notifying user that TOTP authentication has been setup.
18
- send_otp_disabled_email :: Send the email notifying user that TOTP authentication has been disabled.
19
- send_otp_setup_email :: Send the email notifying user that TOTP authentication has been setup.
data/doc/otp_unlock.rdoc DELETED
@@ -1,58 +0,0 @@
1
- = Documentation for OTP Unlock Feature
2
-
3
- The otp_unlock feature implements unlocking of TOTP authentication after
4
- TOTP authentication. The user must consecutively successfully authenticate
5
- with TOTP multiple times (default: 3) within a given time period (15 minutes
6
- per attempt) in order to unlock TOTP authentication. By requiring
7
- consecutive successful unlocks, with a delay after failure, it is infeasible
8
- to brute force the TOTP unlock process.
9
-
10
- The otp_unlock feature depends on the otp feature.
11
-
12
- == Auth Value Methods
13
-
14
- otp_unlock_additional_form_tags :: HTML fragment containing additional form tags to use on the OTP unlock form.
15
- otp_unlock_auth_deadline_passed_error_flash :: The flash error to show if attempting to unlock OTP after the deadline for submittal has passed.
16
- otp_unlock_auth_deadline_passed_error_status :: The response status to use if attempting to unlock OTP after the deadline for submittal has passed, 403 by default.
17
- otp_unlock_auth_failure_cooldown_seconds :: The number of seconds the user must wait to attempt OTP unlock again after a failed OTP unlock attempt.
18
- otp_unlock_auth_failure_error_flash :: The flash error to show if attempting to unlock OTP using an incorrect authentication code.
19
- otp_unlock_auth_failure_error_status :: The response status to use if attempting to unlock OTP using an incorrect authentication code, 403 by default.
20
- otp_unlock_auth_not_yet_available_error_flash :: The flash error to show if attempting to unlock OTP when doing so is not yet available due to a recent attempt.
21
- otp_unlock_auth_not_yet_available_error_status :: The response status to use if attempting to unlock OTP when doing so is not yet available due to a recent attempt, 403 by default.
22
- otp_unlock_auth_success_notice_flash :: The flash notice to show upon successful unlock authentication, when additional unlock authentication is still needed.
23
- otp_unlock_auths_required :: The number of consecutive successful authentication attempts needed to unlock OTP authentication, 3 by default.
24
- otp_unlock_button :: Text to use for button on OTP unlock form.
25
- otp_unlock_consecutive_successes_label :: Text to show next to the number of consecutive successful authentication attempts the user has already made.
26
- otp_unlock_deadline_seconds :: The number of seconds between a previously successful authentication attempt and the next successful authentication attempt. This defaults to twice the amount of time of the OTP interval (30 seconds) plus twice the amount of allowed drift (30 seconds), for a total of 120 seconds. This is to make sure the same OTP code cannot be used more than one when unlocking.
27
- otp_unlock_form_footer :: A footer to display at the bottom of the OTP unlock form.
28
- otp_unlock_id_column :: The column in the +otp_unlock_table+ containing the account id.
29
- otp_unlock_next_auth_attempt_after_column :: The column in the +otp_unlock_table+ containing a timestamp for when the user can next try an authentication attempt.
30
- otp_unlock_next_auth_attempt_label :: Text to show next to the time when the next unlock authentication attempt will be allowed.
31
- otp_unlock_next_auth_attempt_refresh_label :: Text to show explaining that the page will refresh when the next unlock authentication attempt will be allowed.
32
- otp_unlock_next_auth_deadline_label :: Text to show next to the deadline for unlock authentication.
33
- otp_unlock_not_available_page_title :: The page title to use on the page letting users know they need to wait to unlock OTP authentication.
34
- otp_unlock_not_locked_out_error_flash :: The flash error to show if attempting to access the OTP unlock page when OTP authentication is not locked out.
35
- otp_unlock_not_locked_out_error_status :: The response status to use if attempting to access the OTP unlock page when OTP authentication is not locked out, 403 by default.
36
- otp_unlock_not_locked_out_redirect :: Where to redirect if attempting to access the OTP unlock page when OTP authentication is not locked out.
37
- otp_unlock_num_successes_column :: The column in the +otp_unlock_table+ containing the number of consecutive successful authentications.
38
- otp_unlock_page_title :: The page title to use on the OTP unlock form.
39
- otp_unlock_refresh_tag :: The meta refresh tag HTML to use to force a refresh of the page. This can be overridden to use a different refresh approach.
40
- otp_unlock_required_consecutive_successes_label :: Text to show next to the number of consecutive successful authentication attempts the user is required to make to unlock OTP authentication.
41
- otp_unlock_route :: The route to the OTP unlock action. Defaults to +otp-unlock+.
42
- otp_unlock_table :: The table name containing the OTP unlock information.
43
- otp_unlocked_notice_flash :: The flash notice to show when OTP authentication is successfully fully unlocked.
44
- otp_unlocked_redirect :: Where to redirect when OTP authentication is successfully fully unlocked.
45
-
46
- == Auth Methods
47
-
48
- after_otp_unlock_auth_failure :: Run arbitrary code after OTP unlock authentication failure.
49
- after_otp_unlock_auth_success :: Run arbitrary code after OTP unlock authentication success.
50
- after_otp_unlock_not_yet_available :: Run arbitrary code when attempting OTP unlock when it is not yet available.
51
- before_otp_unlock_attempt :: Run arbitrary code before checking whether OTP unlock authentication code is valid.
52
- before_otp_unlock_route :: Run arbitrary code before handling an OTP unlock route.
53
- otp_unlock_auth_failure :: Handle a authentication failure when trying to unlock. By default, this sets the number of consecutive successful authentication attempts to 0, and forces a significant delay before the next unlock authentication attempt can be made.
54
- otp_unlock_auth_success :: Handle a authentication failure when trying to unlock. By default, this increments the number of consecutive successful authentication attempts, and imposes a short delay before the next unlock authentication attempt can be made (to ensure the code cannot be reused).
55
- otp_unlock_available? :: Returns whether it is possible to unlock OTP authentication. This assumes that OTP is already locked out.
56
- otp_unlock_deadline_passed? :: Returns whether the deadline to submit an OTP unlock authentication code has passed.
57
- otp_unlock_not_available_view :: The HTML to use for the page when the OTP unlock form is not yet available due to a recent unlock authentication attempt.
58
- otp_unlock_view :: The HTML to use for the OTP unlock form.
@@ -1,34 +0,0 @@
1
- = Documentation for Password Complexity Feature
2
-
3
- The password complexity feature implements more sophisticated password
4
- complexity checks. It is not recommended to use this feature unless
5
- you have a policy that requires it, as users that would not choose a
6
- good password in the absense of password complexity requirements are
7
- unlikely to choose a good password if you have password complexity
8
- requirements.
9
-
10
- Checks:
11
-
12
- * Contains characters in multiple character groups, by default at
13
- least 3 of uppercase letters, lowercase letters, numbers, and
14
- everything else, unless the password is over 11 characters.
15
- * Does not contain any invalid patterns, by default patterns like
16
- +qwerty+, +azerty+, +asdf+, +zxcv+, or number sequences such as +123+.
17
- * Does not contain a certain number of repeating characters, by default 3.
18
- * Is not a dictionary word, after stripping off numbers from the prefix
19
- and suffix and replacing some common numbers/symbols often substituted
20
- for letters, catching things like <tt>P@$$w0rd1</tt>.
21
-
22
- == Auth Value Methods
23
-
24
- password_character_groups :: An array of regular expressions representing different character groups.
25
- password_dictionary :: A Array/Hash/Set containing dictionary words, which cannot match the password.
26
- password_dictionary_file :: A file containing dictionary words, which will not be allowed. By default, <tt>/usr/share/dict/words</tt> if present. Set to false to not use a password dictionary. Note that this is only used during initialization, and cannot refer to request-specific state, unlike most other settings.
27
- password_in_dictionary_message :: The error message fragment to show if the password is derived from a word in a dictionary.
28
- password_invalid_pattern :: A regexp where any match is considered an invalid password. For multiple sequences, use +Regexp.union+.
29
- password_invalid_pattern_message :: The error message fragment to show if the password matches the invalid pattern.
30
- password_max_length_for_groups_check :: The number of characters above which to skip the checks for character groups.
31
- password_max_repeating_characters :: The maximum number of repeating characters allowed.
32
- password_min_groups :: The minimum number of character groups the password has to contain if it is less than +password_max_length_for_groups_check+ characters.
33
- password_not_enough_character_groups_message :: The error message fragment to show if the password does not contain characters from enough character groups.
34
- password_too_many_repeating_characters_message :: The error message fragment to show if the password contains too many repeating characters.
@@ -1,38 +0,0 @@
1
- = Documentation for Password Expiration Feature
2
-
3
- The password expiration feature requires that users change their
4
- password on login if it has expired (default: every 90 days). You can
5
- force password expiration checks for all logged in users by adding
6
- the following code to your route block:
7
-
8
- rodauth.require_current_password
9
-
10
- Additionally, you can set a minimum amount of time after a password
11
- is changed until it can be changed again. By default this is not
12
- enabled, but it can be enabled by setting +allow_password_change_after+
13
- to a positive number of seconds.
14
-
15
- It is not recommended to use this feature unless you have a policy that
16
- requires it, as password expiration in general results in users chosing
17
- weaker passwords. When asked to change their password, many users choose
18
- a password that is based on their previous password, so forcing password
19
- expiration is in general a net loss from a security perspective.
20
-
21
- == Auth Value Methods
22
-
23
- allow_password_change_after :: How long in seconds after the last password change until another password change is allowed (always allowed by default).
24
- password_change_needed_redirect :: Where to redirect if a password needs to be changed.
25
- password_changed_at_session_key :: The key in the session storing the timestamp the password was changed at.
26
- password_expiration_changed_at_column :: The column in the +password_expiration_table+ containing the timestamp
27
- password_expiration_default :: If the last password change time for an account cannot be determined, whether to consider the account expired, false by default.
28
- password_expiration_error_flash :: The flash error to display when the account's password has expired and needs to be changed.
29
- password_expiration_id_column :: The column in the +password_expiration_table+ containing the account's id.
30
- password_expiration_table :: The table holding the password last changed timestamps.
31
- password_not_changeable_yet_error_flash :: The flash error to display when not enough time has elapsed since the last password change and an attempt is made to change the password.
32
- password_not_changeable_yet_redirect :: Where to redirect if the password cannot be changed yet.
33
- require_password_change_after :: How long in seconds until a password change is required (90 days by default).
34
-
35
- == Auth Methods
36
-
37
- password_expired? :: Whether the password has expired for the related account.
38
- update_password_changed_at :: Update the password last changed timestamp for the current account.
@@ -1,24 +0,0 @@
1
- = Documentation for Password Grace Period Feature
2
-
3
- The password grace period feature keeps track of the last time the
4
- user entered their password in the session, and doesn't require they reenter their
5
- password for account modifications if they recently entered it correctly.
6
-
7
- If you would like to provide extra security before certain routes, you can use
8
- the confirm password feature to require users to reenter their password if they
9
- haven't entered it recently:
10
-
11
- rodauth.require_password_authentication
12
-
13
- By default, this does not redirect if the session has been authenticated via
14
- password, but with the password_grace_period feature, it also redirects if the
15
- password has not been entered recently.
16
-
17
- == Auth Value Methods
18
-
19
- last_password_entry_session_key :: The session key in which to store the last password entry time.
20
- password_grace_period :: The number of seconds after a password entry until password reentry is required, 300 by default (5 minutes).
21
-
22
- == Auth Methods
23
-
24
- password_recently_entered? :: Whether the password has last been entered within the grace period.
@@ -1,52 +0,0 @@
1
- = Documentation for Password Pepper Feature
2
-
3
- The password pepper feature appends a specified secret string to passwords
4
- before they are hashed. This way, if the password hashes get compromised, an
5
- attacker cannot use them to crack the passwords without also knowing the
6
- pepper.
7
-
8
- In the configuration block set the +password_pepper+ with your secret string.
9
- It's recommended for the password pepper to be at last 32 characters long and
10
- randomly generated.
11
-
12
- password_pepper "<long secret key>"
13
-
14
- If your database already contains password hashes that were created without a
15
- password pepper, these will get automatically updated with a password pepper
16
- next time the user successfully enters their password.
17
-
18
- If you're using bcrypt (default), you should set +password_maximum_bytes+ so
19
- that password + pepper don't exceed 72 bytes. This is because bcrypt truncates
20
- passwords longer than 72 bytes, enabling an attacker to crack the pepper if the
21
- password bytesize is unlimited. If you're using argon2, you should probably set
22
- +argon2_secret+ instead of using this feature.
23
-
24
- == Pepper Rotation
25
-
26
- You can rotate the password pepper as well, just make sure to add the previous
27
- pepper to the +previous_password_peppers+ array. Password hashes using the old
28
- pepper will get automatically updated on the next successful password match.
29
-
30
- password_pepper "new pepper"
31
- previous_password_peppers ["old pepper", ""]
32
-
33
- The empty string above ensures password hashes without pepper are handled as
34
- well.
35
-
36
- Note that each entry in +previous_password_peppers+ will multiply the amount of
37
- possible password checks during login, at least for incorrect passwords.
38
-
39
- Additionally, when using this feature with the disallow_password_reuse feature,
40
- the number of passwords checked when changing or resetting a password will be
41
-
42
- (previous_password_peppers.length + 1) * previous_passwords_to_check
43
-
44
- So if you have 2 entries in +previous_password_peppers+, using the default
45
- value of 6 for +previous_passwords_to_check+, every time a password
46
- is changed, there will be 18 password checks done, which will be quite slow.
47
-
48
- == Auth Value Methods
49
-
50
- password_pepper :: The secret string appended to passwords before they are hashed.
51
- previous_password_peppers :: An array of password peppers that will be tried on an unsuccessful password match. Defaults to <tt>[""]</tt>, which allows introducing this feature with existing passwords.
52
- password_pepper_update? :: Whether to update password hashes that use a pepper from +previous_password_peppers+ with a new pepper. Defaults to +true+.
@@ -1,10 +0,0 @@
1
- = Documentation for Path Class Methods Feature
2
-
3
- The path class methods feature allows for calling the *_path and *_url
4
- methods directly on the class, as opposed to an instance of the class.
5
-
6
- In order for the *_url methods to be used, you must use the base_url
7
- configuration so that determining the base URL doesn't depend on the
8
- submitted request, as the request will not be set when using the
9
- class method. Failure to do this will probably result in a NoMethodError
10
- being raised.