rack-jive-signed_request 0.1.1 → 0.1.2
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.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/Gemfile.lock +1 -1
- data/lib/rack/jive/signed_request.rb +6 -6
- data/lib/rack/jive/signed_request/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: 9642a95014b328f8f8e43512ed6186eb85c94729
|
|
4
|
+
data.tar.gz: e20d6a056432191cd43571c036db86ef743525e6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aa924164532d4c5a3d67408faf60bcc69c5cdce3e7b70b881bb8ee16f57660052c410310885690acf41bef9cfd3738bfcd6ac5e30a55ffcfa286bee6360d05a6
|
|
7
|
+
data.tar.gz: 69a703aea48749c75173bc9a27c0c7266a8dce62122d018e67b03941f1f69647c8dc8d60ca6a9f2240c607049ad11477506c2026c8217b56079cf9551d423741
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -23,11 +23,11 @@ module Rack
|
|
|
23
23
|
request = Request.new(env)
|
|
24
24
|
|
|
25
25
|
# Only bother authenticating if the request is identifying itself as signed
|
|
26
|
-
if env["
|
|
27
|
-
auth_header_params = ::CGI.parse env["
|
|
26
|
+
if env["HTTP_X_SHINDIG_AUTHTYPE"] === "signed" || env["HTTP_AUTHORIZATION"].to_s.match(/^JiveEXTN/)
|
|
27
|
+
auth_header_params = ::CGI.parse env["HTTP_AUTHORIZATION"].gsub(/^JiveEXTN\s/,'')
|
|
28
28
|
|
|
29
29
|
begin
|
|
30
|
-
unless ::Jive::SignedRequest.authenticate(env["
|
|
30
|
+
unless ::Jive::SignedRequest.authenticate(env["HTTP_AUTHORIZATION"], @secret.call(auth_header_params))
|
|
31
31
|
return [401, {"Content-Type" => "text/html"}, ["Invalid"]]
|
|
32
32
|
end
|
|
33
33
|
rescue ArgumentError => $e
|
|
@@ -35,9 +35,9 @@ module Rack
|
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
-
env["jive.user_id"] = env["
|
|
39
|
-
env["jive.email"] = env["
|
|
40
|
-
env["jive.external"] = (env["
|
|
38
|
+
env["jive.user_id"] = env["HTTP_X_JIVE_USER_ID"]
|
|
39
|
+
env["jive.email"] = env["HTTP_X_JIVE_USER_EMAIL"]
|
|
40
|
+
env["jive.external"] = (env["HTTP_X_JIVE_USER_EXTERNAL"] === "true")
|
|
41
41
|
|
|
42
42
|
@app.call(env)
|
|
43
43
|
end
|