di-simple_auth 0.2.9 → 0.3.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.
- data/VERSION.yml +2 -2
- data/lib/simple_auth/authenticated.rb +3 -3
- metadata +4 -4
data/VERSION.yml
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'digest/sha1'
|
2
2
|
module SimpleAuth
|
3
3
|
module Authenticated
|
4
4
|
# Hook for all Clearance::User modules.
|
@@ -78,7 +78,7 @@ module SimpleAuth
|
|
78
78
|
|
79
79
|
def initialize_salt
|
80
80
|
if new_record?
|
81
|
-
self.password_salt =
|
81
|
+
self.password_salt = Digest::SHA1.hexdigest Time.now
|
82
82
|
end
|
83
83
|
end
|
84
84
|
|
@@ -95,7 +95,7 @@ module SimpleAuth
|
|
95
95
|
end
|
96
96
|
|
97
97
|
def encrypt(password)
|
98
|
-
|
98
|
+
Digest::SHA1.hexdigest "#{password}#{password_salt}"
|
99
99
|
end
|
100
100
|
|
101
101
|
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
8
|
-
-
|
9
|
-
version: 0.
|
7
|
+
- 3
|
8
|
+
- 0
|
9
|
+
version: 0.3.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Dieinzige
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-03-
|
17
|
+
date: 2010-03-11 00:00:00 +03:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|