ey_api_hmac 0.0.14 → 0.0.15
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/lib/ey_api_hmac.rb +5 -1
- data/lib/ey_api_hmac/api_auth.rb +3 -1
- data/lib/ey_api_hmac/version.rb +1 -1
- metadata +3 -3
data/Gemfile.lock
CHANGED
data/lib/ey_api_hmac.rb
CHANGED
@@ -22,7 +22,11 @@ module EY
|
|
22
22
|
parts << expect["CONTENT_TYPE"]
|
23
23
|
parts << generated_md5(env)
|
24
24
|
parts << expect["HTTP_DATE"]
|
25
|
-
|
25
|
+
if env["REQUEST_URI"]
|
26
|
+
parts << URI.parse(env["REQUEST_URI"]).path
|
27
|
+
else
|
28
|
+
parts << expect["PATH_INFO"]
|
29
|
+
end
|
26
30
|
parts.join("\n")
|
27
31
|
end
|
28
32
|
|
data/lib/ey_api_hmac/api_auth.rb
CHANGED
@@ -64,7 +64,9 @@ module EY
|
|
64
64
|
ApiHMAC.sign!(env, @auth_id, @auth_key)
|
65
65
|
tuple = @app.call(env)
|
66
66
|
if tuple.first.to_i == 401
|
67
|
-
|
67
|
+
response_body = ""
|
68
|
+
tuple.last.each{ |v| response_body << v }
|
69
|
+
raise AuthFailure, "HMAC Authentication Failed: #{response_body}"
|
68
70
|
end
|
69
71
|
tuple
|
70
72
|
end
|
data/lib/ey_api_hmac/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ey_api_hmac
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 15
|
10
|
+
version: 0.0.15
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- "Jacob Burkhart & Thorben Schr\xC3\xB6der & David Calavera & others"
|