devise_password_expirable 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 6e0d5b2ea8c0059354387b7d9e7d69003f0ed633
|
4
|
-
data.tar.gz: 5d7373fbf50962d66ae4c1dcbb57ca2d8cd765e5
|
5
2
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d3e8881bb3870a91d24a9e894a92a481e6f56668767cb88abff42cad3b54fb8ad7492e6ccdfaba57c549fb92b4e5193061f7c87711c980671827e1418894ad6
|
4
|
+
data.tar.gz: ad827f12d3326a170d30d8d490ef6e275e4ea78639a49eff46768d798ddd316512ac732c0a647a7b93f6d53c0edf90824caca410ce4c05c3392773177f870547
|
5
|
+
SHA1:
|
6
|
+
metadata.gz: 2ee21e261221c945e9ded5b983d91b8f5ac1a561
|
7
|
+
data.tar.gz: 136e09527fdf7be7916902f9eff56078765f4671
|
data/README.md
CHANGED
@@ -1,3 +1,31 @@
|
|
1
1
|
## Expire passwords plugin for Devise
|
2
2
|
|
3
|
-
This plugin expires user passwords after a set time period.
|
3
|
+
This plugin expires user passwords after a set time period. The plugin assumes you have a column called "last_password_reset" in your table.
|
4
|
+
|
5
|
+
## Features
|
6
|
+
|
7
|
+
* set the length of time after which passwords expire
|
8
|
+
|
9
|
+
## Configuration
|
10
|
+
|
11
|
+
### Initial Setup
|
12
|
+
|
13
|
+
In a Rails environment, add the following line to your Gemfile:
|
14
|
+
|
15
|
+
gem 'devise_password_expirable'
|
16
|
+
|
17
|
+
From the command line, run:
|
18
|
+
|
19
|
+
bundle install
|
20
|
+
|
21
|
+
### Installation
|
22
|
+
|
23
|
+
To add the correct settings to your already-existing devise initializer, run this command in the command line:
|
24
|
+
|
25
|
+
rails generate devise_password_expirable:install
|
26
|
+
|
27
|
+
To enable the plugin, add
|
28
|
+
|
29
|
+
:password_expirable
|
30
|
+
|
31
|
+
to your model's devise parameters.
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<h2>Renew your password</h2>
|
2
|
-
<p>Your password
|
2
|
+
<p>Your current password has expired. Please create a new password.</p>
|
3
3
|
|
4
4
|
<%= form_for(resource, :as => resource_name, :url => [resource_name, :password_expired], :html => { :method => :put }) do |f| %>
|
5
5
|
<%= devise_error_messages! %>
|
@@ -11,9 +11,6 @@ module Devise # :nodoc:
|
|
11
11
|
mattr_accessor :expire_password_after
|
12
12
|
@@expire_password_after = 3.months
|
13
13
|
|
14
|
-
# Validate password for strongness
|
15
|
-
mattr_accessor :password_regex
|
16
|
-
@@password_regex = /^\w*(?=\w*\d)(?=\w*[a-z])(?=\w*[A-Z])\w*$/
|
17
14
|
end
|
18
15
|
|
19
16
|
# an security extension for devise
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise_password_expirable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jenni Kissinger
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2014-10-
|
12
|
+
date: 2014-10-28 00:00:00 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|