graphql_authorizer 1.0.0 → 1.0.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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 386c9f4b8638041a3dde16dfc61714a8a445a976c5f5a77013334f66fd57fb72
|
|
4
|
+
data.tar.gz: 1d97b03642e65e0ecafac594a859edacf2fa183da933ef8d72644497a3d52b80
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 87c51130226e13cad005c2f049f151cf74e1695e7e55f2494a9a00ec19347a9c420b3bf4bb5d786ab2c0a05363ebdd29c11873f352a5b6187b04b9232a5231ce
|
|
7
|
+
data.tar.gz: 85a45f9fa33442e42d4ac94f4c91bba5b0e046213ff8c98ffe56ba69b7b5e21079870cbd099f28f41da469fa4a45f3254002dfdb06e871c0ee7b4c0433dc63e5
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
class Rack::Attack
|
|
2
|
-
bindin.pry
|
|
3
2
|
### Allow Localhost ###
|
|
4
3
|
# Always allow requests from localhost
|
|
5
4
|
# (blocklist & throttles are skipped)
|
|
@@ -9,9 +8,11 @@ class Rack::Attack
|
|
|
9
8
|
end
|
|
10
9
|
|
|
11
10
|
blocklist("check authorization") do |req|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
# uncomment this line if you implement graphql_token validation
|
|
12
|
+
# graphiql_token = ENV.fetch("GRAPHIQL_TOKEN")
|
|
13
|
+
# is_graphiql_request = req.env["HTTP_GRAPHIQL_TOKEN"] == graphiql_token
|
|
14
|
+
# next if !req.path.start_with?("/graphql") || is_graphiql_request
|
|
15
|
+
next if !req.path.start_with?("/graphql")
|
|
15
16
|
request_validator = GraphQLAuthorizer::Request.new(
|
|
16
17
|
sig: req.env["HTTP_SIGNATURE"], # replace with Signature Header
|
|
17
18
|
timestamp: req.env["HTTP_TIMESTAMP"] # replace with Time Stamp Header
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: graphql_authorizer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Peter John Alvarado
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-09-
|
|
11
|
+
date: 2018-09-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: openssl
|