iap-verifier 1.0.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rack/iap_verifier.rb +3 -3
  3. metadata +9 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fceb7ebeab21bcdc0a3524d264cabbf9cdf08cb24722578579f955f0479a30c6
4
- data.tar.gz: c4d109dbb1148f5eac052d5efb5786f2e2e688974bd03a26644c1ba1e3891089
3
+ metadata.gz: a24ffa0907fe59feef78b1d247e9c12bffbee4f4407dab41b93dbf17863d2905
4
+ data.tar.gz: a89b8370d381c4e09fcce54edd4f65c13b499a22e428283ed27ad4c5812466e4
5
5
  SHA512:
6
- metadata.gz: ff56babfe74a9b96452f8a09250d9e3d42aabaf73386fd4f5a7069c90a7375d6f97261a3174bbb1867a8eee656be3bd522ee66b294a0ef4a990307ec54248171
7
- data.tar.gz: c36b35f0a8cf8cd46960616b9353f5ababfcb22a504e07771dc406bfd2d27748d4b71601624ae4f154b5726a00b19b5a4512e42fc3d351aff2c84f8513abaca0
6
+ metadata.gz: 403a0bd2f1af7a98f2c23ef842927ff3b5c3b45943f30413346dcf13813983d1b7d7e77197caf2421cfe919c9c41b24b3e90a57949f7fc2472591283c8a61322
7
+ data.tar.gz: 68dd413a07e49afd2867d58a5639f9f246e0e8ae0bf75dce175bf6d3b05f15895edfc3d70a50f27d1cd7a99be4d76d3d99f1e7cc36b96ea24621f8a24235c6e8
@@ -9,7 +9,7 @@ module Rack
9
9
  PUBLIC_KEYS_ENDPOINT = 'https://www.gstatic.com/iap/verify/public_key'.freeze
10
10
  ISSUER = 'https://cloud.google.com/iap'.freeze
11
11
 
12
- def initialize(app, audience, skip_localhost = false, skip_paths = [])
12
+ def initialize(app, audience, skip_localhost = false, skip_paths = nil)
13
13
  @app = app
14
14
  @audience = audience
15
15
  @skip_localhost = skip_localhost
@@ -34,7 +34,7 @@ module Rack
34
34
  end
35
35
 
36
36
  def skip_path?(env)
37
- skip_paths.include?(env['PATH_INFO'])
37
+ skip_paths&.match?(env['PATH_INFO'])
38
38
  end
39
39
 
40
40
  def valid_jwt?(token)
@@ -62,7 +62,7 @@ module Rack
62
62
  cached_key = public_keys[kid]
63
63
  return cached_key if cached_key
64
64
 
65
- @public_keys = JSON.parse(open(PUBLIC_KEYS_ENDPOINT).read)
65
+ @public_keys = JSON.parse(URI.open(PUBLIC_KEYS_ENDPOINT).read)
66
66
 
67
67
  cached_key = public_keys[kid]
68
68
  return cached_key if cached_key
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iap-verifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - dawid.janczak@yourgolftravel.com
@@ -10,36 +10,36 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-02-15 00:00:00.000000000 Z
13
+ date: 2022-11-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- name: rack
16
+ name: bundler
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
19
  - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: '2.0'
21
+ version: '1.15'
22
22
  type: :development
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - "~>"
27
27
  - !ruby/object:Gem::Version
28
- version: '2.0'
28
+ version: '1.15'
29
29
  - !ruby/object:Gem::Dependency
30
- name: bundler
30
+ name: rack
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - "~>"
34
34
  - !ruby/object:Gem::Version
35
- version: '1.15'
35
+ version: '2.0'
36
36
  type: :development
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - "~>"
41
41
  - !ruby/object:Gem::Version
42
- version: '1.15'
42
+ version: '2.0'
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: rake
45
45
  requirement: !ruby/object:Gem::Requirement
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  - !ruby/object:Gem::Version
109
109
  version: '0'
110
110
  requirements: []
111
- rubygems_version: 3.1.2
111
+ rubygems_version: 3.3.7
112
112
  signing_key:
113
113
  specification_version: 4
114
114
  summary: IAP Verifier middleware