auth 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/auth.rb +6 -6
- data/lib/auth/version.rb +1 -1
- metadata +8 -8
data/lib/auth.rb
CHANGED
@@ -60,9 +60,9 @@ module Auth
|
|
60
60
|
hash = ENV['AUTH_HASH_ALGORITHM']
|
61
61
|
salt = generate_secret
|
62
62
|
crypted_password = encrypt_password(password, salt, hash)
|
63
|
-
redis.
|
64
|
-
|
65
|
-
|
63
|
+
redis.hmset("account:#{username}", 'crypted_password', crypted_password,
|
64
|
+
'password_hash', hash,
|
65
|
+
'password_salt', salt)
|
66
66
|
return true
|
67
67
|
else
|
68
68
|
return false
|
@@ -90,9 +90,9 @@ module Auth
|
|
90
90
|
hash = ENV['AUTH_HASH_ALGORITHM']
|
91
91
|
salt = generate_secret
|
92
92
|
crypted_password = encrypt_password(new_password, salt, hash)
|
93
|
-
redis.
|
94
|
-
|
95
|
-
|
93
|
+
redis.hmset("account:#{username}", 'crypted_password', crypted_password,
|
94
|
+
'password_hash', hash,
|
95
|
+
'password_salt', salt)
|
96
96
|
end
|
97
97
|
end
|
98
98
|
|
data/lib/auth/version.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 2
|
9
|
+
version: 0.0.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Niklas Holmgren
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-
|
17
|
+
date: 2011-06-07 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -23,7 +23,7 @@ dependencies:
|
|
23
23
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
24
|
none: false
|
25
25
|
requirements:
|
26
|
-
- -
|
26
|
+
- - ">"
|
27
27
|
- !ruby/object:Gem::Version
|
28
28
|
segments:
|
29
29
|
- 1
|
@@ -38,7 +38,7 @@ dependencies:
|
|
38
38
|
requirement: &id002 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
|
-
- -
|
41
|
+
- - ">"
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
segments:
|
44
44
|
- 1
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
requirement: &id003 !ruby/object:Gem::Requirement
|
54
54
|
none: false
|
55
55
|
requirements:
|
56
|
-
- -
|
56
|
+
- - ">"
|
57
57
|
- !ruby/object:Gem::Version
|
58
58
|
segments:
|
59
59
|
- 2
|
@@ -68,7 +68,7 @@ dependencies:
|
|
68
68
|
requirement: &id004 !ruby/object:Gem::Requirement
|
69
69
|
none: false
|
70
70
|
requirements:
|
71
|
-
- -
|
71
|
+
- - ">"
|
72
72
|
- !ruby/object:Gem::Version
|
73
73
|
segments:
|
74
74
|
- 0
|
@@ -83,7 +83,7 @@ dependencies:
|
|
83
83
|
requirement: &id005 !ruby/object:Gem::Requirement
|
84
84
|
none: false
|
85
85
|
requirements:
|
86
|
-
- -
|
86
|
+
- - ">"
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
segments:
|
89
89
|
- 0
|