Sha256: 981d0b6c963538decdefd950defcec1c488e46aaa4d07e42e6b99e99e8c5b1d2
Contents?: true
Size: 972 Bytes
Versions: 2
Compression:
Stored size: 972 Bytes
Contents
require 'devise' require 'devise/models/password_expirable' require 'devise/extension_routes' module Devise # Should the password expire (e.g 3.months) mattr_accessor :expire_password_after @@expire_password_after = 3.months # Validate password strength mattr_accessor :password_regex @@password_regex = nil # Need 1 char of A-Z, a-z and 0-9 # @@password_regex = /(?=.*\d)(?=.*[a-z])(?=.*[A-Z])/ mattr_accessor :password_regex_message @@password_regex_message = 'must contains at least one uppercase letter, one lower case letter and a number' end # an security extension for devise module DeviseExtension module Controllers autoload :Helpers, 'devise/controllers/extension_helpers' end end # modules Devise.add_module :password_expirable, controller: :password_expirable, model: 'devise/models/password_expirable', route: :password_expired ActiveSupport.on_load(:action_controller) do include DeviseExtension::Controllers::Helpers end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mno-enterprise-core-3.0.7 | lib/devise_extension.rb |
mno-enterprise-core-2.0.9 | lib/devise_extension.rb |