Module: OneTimePassword
- Defined in:
- lib/one_time_password/errors.rb,
lib/one_time_password/railtie.rb,
lib/one_time_password/version.rb,
lib/generators/one_time_password/install_generator.rb,
lib/one_time_password/one_time_authentication_model.rb,
lib/generators/one_time_password/templates/config/initializers/one_time_password.rb
Defined Under Namespace
Modules: Errors, OneTimeAuthenticationModel Classes: InstallGenerator, Railtie
Constant Summary collapse
- VERSION =
"0.2.1"- FUNCTION_NAMES =
include OneTimePassword::OneTimeAuthenticationModel end
</code> { sign_up: 0, sign_in: 1, change_email: 2 }
- CONTEXTS =
{ function_name (Symbol): Name each function. expires_in (ActiveSupport::Duration): Password validity time. max_authenticate_password_count (Integer): Number of times user can enter password each generated password. password_length (Integer): Password length. At 6, for example, the password would be 123456. password_failed_limit (Integer) & password_failed_period (ActiveSupport::Duration): If you try to authenticate with the wrong password a password_failed_limit times within the time set by password_failed_period, you will not be able to generate a new password. }
[ { function_name: :sign_up, expires_in: 30.minutes, max_authenticate_password_count: 5, password_length: 6, password_failed_limit: 10, password_failed_period: 1.hour }, { function_name: :sign_in, expires_in: 30.minutes, max_authenticate_password_count: 5, password_length: 10, password_failed_limit: 10, password_failed_period: 1.hour }, # { # function_name: :change_email, # expires_in: 30.minutes, # max_authenticate_password_count: 5, # password_length: 6 # }, ]