graphql_authorizer 1.0.0 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 686bf1bf26471f700bc0cbf1187529aec7909a35d47cfe6e008e35202f343c8d
4
- data.tar.gz: eaaecb01b4df704600d16d4cac6fd52c125a474ddfb1d7922dc8b608b552318c
3
+ metadata.gz: 386c9f4b8638041a3dde16dfc61714a8a445a976c5f5a77013334f66fd57fb72
4
+ data.tar.gz: 1d97b03642e65e0ecafac594a859edacf2fa183da933ef8d72644497a3d52b80
5
5
  SHA512:
6
- metadata.gz: 10a5b233aa63bb16208a2b28f833aee425a42169dd58b2ba4ff0029b21883b7025fb3ccc3e99945bad173a7c9da450b98643276e393f5f6259f53f135adc3b9f
7
- data.tar.gz: 63d7763556382ce209de0f33a9d606201a6c546dcdda3370a1aeb691a5dbeea2de01c27db4cb1fa0ee64889425888b0fdafaae027b6e7072606c2d8b1e0727dd
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
- 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
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
@@ -1,3 +1,3 @@
1
1
  module GraphQLAuthorizer
2
- VERSION = "1.0.0".freeze
2
+ VERSION = "1.0.2".freeze
3
3
  end
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.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-03 00:00:00.000000000 Z
11
+ date: 2018-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: openssl