s2s-auth 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/changelog.md +1 -0
- data/lib/s2s/auth.rb +2 -2
- data/lib/s2s/auth/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 608e06b903301795500495c0635b881a78795e88
|
4
|
+
data.tar.gz: 48fe14ca4acc6e539dddea0035e04447274ef891
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11cf5a18bceacf56ae905c5cad6d3f11b4342d684918bae17f2b59f02037bed47feb4574e92bb85a92d208f3986c2473977bd09c2416b25a0ec635ade16530ac
|
7
|
+
data.tar.gz: d4283b594c33d61898753407afc40cae98ff99af340da90811c45943690a1a3d8b6a839e46d0b656da6951cd0f2e15121a10e4fd4122ece9613ee3cc205a6077
|
data/Gemfile.lock
CHANGED
data/changelog.md
CHANGED
data/lib/s2s/auth.rb
CHANGED
@@ -31,9 +31,9 @@ module S2S
|
|
31
31
|
if [@secret, @app_name, @salt, @sign_salt].any?{|v| v.nil? || v.empty?}
|
32
32
|
raise ArgumentError.new("This module needs to be setup following keys: secret, app, salt, sign_salt")
|
33
33
|
end
|
34
|
-
@iterations = opts[:iterations] || opts["iterations"] || 1000
|
35
34
|
@serializer = opts[:serializer] || opts["serializer"] || S2S::Auth::JsonSerializer
|
36
|
-
|
35
|
+
@iterations = opts[:iterations] || opts["iterations"] || 1000
|
36
|
+
keygen = ActiveSupport::CachingKeyGenerator.new(ActiveSupport::KeyGenerator.new(@secret, iterations: @iterations))
|
37
37
|
secret = keygen.generate_key(@salt)
|
38
38
|
sign_secret = keygen.generate_key(@sign_salt)
|
39
39
|
@encryptor = ActiveSupport::MessageEncryptor.new(secret, sign_secret, { serializer: @serializer } )
|
data/lib/s2s/auth/version.rb
CHANGED