grape-jwt-authentication 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +31 -27
- data/README.md +1 -1
- data/doc/assets/project.svg +68 -0
- data/grape-jwt-authentication.gemspec +1 -1
- data/lib/grape/jwt/authentication/rsa_public_key.rb +6 -1
- data/lib/grape/jwt/authentication/version.rb +1 -1
- metadata +12 -9
- data/doc/assets/logo.png +0 -0
- data/doc/assets/project.png +0 -0
- data/doc/assets/project.xcf +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7900166f72226d3f5dc97a2f025ff3d2e515555a3828382aaa6bbe40f76e7fd6
|
4
|
+
data.tar.gz: bd31474aac492ba98f0eb86b1b669e948daac39686b4a12b7e658954a8687813
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2f26a9a534a847b94cfc05db8dde97bf9592ff1ab42204e21e3c7334cfd9f6a2d4328948a23e536c07e48c027932ef17b68c58c9a40226d014cbb00498b6bf0
|
7
|
+
data.tar.gz: dfa9f8e2362e79126df5e5ff6de634ef47c9cc2cb1f2cb44907766902772025d9d16e22a0fbc487c9c7058c1853f38b1459746100a4c06538e5b2d26fb6f8c11
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -11,12 +11,12 @@ PATH
|
|
11
11
|
GEM
|
12
12
|
remote: https://rubygems.org/
|
13
13
|
specs:
|
14
|
-
activesupport (5.2.
|
14
|
+
activesupport (5.2.2)
|
15
15
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
16
16
|
i18n (>= 0.7, < 2)
|
17
17
|
minitest (~> 5.1)
|
18
18
|
tzinfo (~> 1.1)
|
19
|
-
addressable (2.
|
19
|
+
addressable (2.6.0)
|
20
20
|
public_suffix (>= 2.0.2, < 4.0)
|
21
21
|
axiom-types (0.1.1)
|
22
22
|
descendants_tracker (~> 0.0.4)
|
@@ -25,58 +25,62 @@ GEM
|
|
25
25
|
builder (3.2.3)
|
26
26
|
coercible (1.0.0)
|
27
27
|
descendants_tracker (~> 0.0.1)
|
28
|
-
concurrent-ruby (1.
|
28
|
+
concurrent-ruby (1.1.4)
|
29
29
|
crack (0.4.3)
|
30
30
|
safe_yaml (~> 1.0.0)
|
31
31
|
descendants_tracker (0.0.4)
|
32
32
|
thread_safe (~> 0.3, >= 0.3.1)
|
33
33
|
diff-lcs (1.3)
|
34
|
-
docile (1.1
|
34
|
+
docile (1.3.1)
|
35
35
|
equalizer (0.0.11)
|
36
|
-
grape (1.
|
36
|
+
grape (1.2.3)
|
37
37
|
activesupport
|
38
38
|
builder
|
39
39
|
mustermann-grape (~> 1.0.0)
|
40
40
|
rack (>= 1.3.0)
|
41
41
|
rack-accept
|
42
42
|
virtus (>= 1.0.0)
|
43
|
-
hashdiff (0.3.
|
44
|
-
httparty (0.16.
|
43
|
+
hashdiff (0.3.8)
|
44
|
+
httparty (0.16.4)
|
45
|
+
mime-types (~> 3.0)
|
45
46
|
multi_xml (>= 0.5.2)
|
46
|
-
i18n (1.
|
47
|
+
i18n (1.5.3)
|
47
48
|
concurrent-ruby (~> 1.0)
|
48
49
|
ice_nine (0.11.2)
|
49
50
|
json (2.1.0)
|
50
51
|
jwt (2.1.0)
|
52
|
+
mime-types (3.2.2)
|
53
|
+
mime-types-data (~> 3.2015)
|
54
|
+
mime-types-data (3.2018.0812)
|
51
55
|
minitest (5.11.3)
|
52
56
|
multi_xml (0.6.0)
|
53
57
|
mustermann (1.0.3)
|
54
58
|
mustermann-grape (1.0.0)
|
55
59
|
mustermann (~> 1.0.0)
|
56
|
-
public_suffix (3.0.
|
57
|
-
rack (2.0.
|
60
|
+
public_suffix (3.0.3)
|
61
|
+
rack (2.0.6)
|
58
62
|
rack-accept (0.4.5)
|
59
63
|
rack (>= 0.4)
|
60
|
-
rack-test (0.8.
|
64
|
+
rack-test (0.8.3)
|
61
65
|
rack (>= 1.0, < 3)
|
62
66
|
rake (10.5.0)
|
63
67
|
recursive-open-struct (1.1.0)
|
64
|
-
rspec (3.
|
65
|
-
rspec-core (~> 3.
|
66
|
-
rspec-expectations (~> 3.
|
67
|
-
rspec-mocks (~> 3.
|
68
|
-
rspec-core (3.
|
69
|
-
rspec-support (~> 3.
|
70
|
-
rspec-expectations (3.
|
68
|
+
rspec (3.8.0)
|
69
|
+
rspec-core (~> 3.8.0)
|
70
|
+
rspec-expectations (~> 3.8.0)
|
71
|
+
rspec-mocks (~> 3.8.0)
|
72
|
+
rspec-core (3.8.0)
|
73
|
+
rspec-support (~> 3.8.0)
|
74
|
+
rspec-expectations (3.8.2)
|
71
75
|
diff-lcs (>= 1.2.0, < 2.0)
|
72
|
-
rspec-support (~> 3.
|
73
|
-
rspec-mocks (3.
|
76
|
+
rspec-support (~> 3.8.0)
|
77
|
+
rspec-mocks (3.8.0)
|
74
78
|
diff-lcs (>= 1.2.0, < 2.0)
|
75
|
-
rspec-support (~> 3.
|
76
|
-
rspec-support (3.
|
79
|
+
rspec-support (~> 3.8.0)
|
80
|
+
rspec-support (3.8.0)
|
77
81
|
safe_yaml (1.0.4)
|
78
|
-
simplecov (0.
|
79
|
-
docile (~> 1.1
|
82
|
+
simplecov (0.16.1)
|
83
|
+
docile (~> 1.1)
|
80
84
|
json (>= 1.8, < 3)
|
81
85
|
simplecov-html (~> 0.10.0)
|
82
86
|
simplecov-html (0.10.2)
|
@@ -90,7 +94,7 @@ GEM
|
|
90
94
|
coercible (~> 1.0)
|
91
95
|
descendants_tracker (~> 0.0, >= 0.0.3)
|
92
96
|
equalizer (~> 0.0, >= 0.0.9)
|
93
|
-
webmock (3.
|
97
|
+
webmock (3.5.1)
|
94
98
|
addressable (>= 2.3.6)
|
95
99
|
crack (>= 0.3.2)
|
96
100
|
hashdiff
|
@@ -99,7 +103,7 @@ PLATFORMS
|
|
99
103
|
ruby
|
100
104
|
|
101
105
|
DEPENDENCIES
|
102
|
-
bundler (
|
106
|
+
bundler (>= 1.16, < 3)
|
103
107
|
grape-jwt-authentication!
|
104
108
|
rack (~> 2.0)
|
105
109
|
rack-test (~> 0.8.2)
|
@@ -111,4 +115,4 @@ DEPENDENCIES
|
|
111
115
|
webmock (~> 3.1)
|
112
116
|
|
113
117
|
BUNDLED WITH
|
114
|
-
1.
|
118
|
+
1.17.3
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
![grape-jwt-authentication](doc/assets/project.
|
1
|
+
![grape-jwt-authentication](doc/assets/project.svg)
|
2
2
|
|
3
3
|
[![Build Status](https://travis-ci.org/hausgold/grape-jwt-authentication.svg?branch=master)](https://travis-ci.org/hausgold/grape-jwt-authentication)
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/grape-jwt-authentication.svg)](https://badge.fury.io/rb/grape-jwt-authentication)
|
@@ -0,0 +1,68 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<svg
|
3
|
+
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
4
|
+
xmlns:cc="http://creativecommons.org/ns#"
|
5
|
+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
6
|
+
xmlns:svg="http://www.w3.org/2000/svg"
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
8
|
+
version="1.1"
|
9
|
+
id="Ebene_1"
|
10
|
+
x="0px"
|
11
|
+
y="0px"
|
12
|
+
viewBox="0 0 800 200"
|
13
|
+
xml:space="preserve"
|
14
|
+
width="800"
|
15
|
+
height="200"><metadata
|
16
|
+
id="metadata33"><rdf:RDF><cc:Work
|
17
|
+
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
18
|
+
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
19
|
+
id="defs31" />
|
20
|
+
<style
|
21
|
+
type="text/css"
|
22
|
+
id="style2">
|
23
|
+
.st0{fill-rule:evenodd;clip-rule:evenodd;fill:#E73E11;}
|
24
|
+
.st1{fill-rule:evenodd;clip-rule:evenodd;fill:#0371B9;}
|
25
|
+
.st2{fill:#132E48;}
|
26
|
+
.st3{font-family:'OpenSans-Bold';}
|
27
|
+
.st4{font-size:29.5168px;}
|
28
|
+
.st5{fill-rule:evenodd;clip-rule:evenodd;fill:none;}
|
29
|
+
.st6{opacity:0.5;fill:#132E48;}
|
30
|
+
.st7{font-family:'OpenSans';}
|
31
|
+
.st8{font-size:12px;}
|
32
|
+
</style>
|
33
|
+
<g
|
34
|
+
transform="translate(0,1.53584)"
|
35
|
+
id="g828"><g
|
36
|
+
transform="translate(35.93985,35.66416)"
|
37
|
+
id="g8">
|
38
|
+
<path
|
39
|
+
style="clip-rule:evenodd;fill:#e73e11;fill-rule:evenodd"
|
40
|
+
id="path4"
|
41
|
+
d="m -0.1,124.4 c 0,0 33.7,-123.2 66.7,-123.2 12.8,0 26.9,21.9 38.8,47.2 -23.6,27.9 -66.6,59.7 -94,76 -7.1,0 -11.5,0 -11.5,0 z"
|
42
|
+
class="st0" />
|
43
|
+
<path
|
44
|
+
style="clip-rule:evenodd;fill:#0371b9;fill-rule:evenodd"
|
45
|
+
id="path6"
|
46
|
+
d="m 88.1,101.8 c 13.5,-10.4 18.4,-16.2 27.1,-25.4 10,25.7 16.7,48 16.7,48 0,0 -41.4,0 -78,0 14.6,-7.9 18.7,-10.7 34.2,-22.6 z"
|
47
|
+
class="st1" />
|
48
|
+
</g><text
|
49
|
+
y="106.40316"
|
50
|
+
x="192.43155"
|
51
|
+
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:29.51733398px;font-family:'Open Sans', sans-serif;-inkscape-font-specification:'OpenSans-Bold, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#132e48"
|
52
|
+
id="text10"
|
53
|
+
class="st2 st3 st4">grape-jwt-authentication</text>
|
54
|
+
<rect
|
55
|
+
style="clip-rule:evenodd;fill:none;fill-rule:evenodd"
|
56
|
+
id="rect12"
|
57
|
+
height="24"
|
58
|
+
width="314.5"
|
59
|
+
class="st5"
|
60
|
+
y="118.06416"
|
61
|
+
x="194.23985" /><text
|
62
|
+
y="127.22146"
|
63
|
+
x="194.21715"
|
64
|
+
style="font-size:12px;font-family:'Open Sans', sans-serif;opacity:0.5;fill:#132e48;-inkscape-font-specification:'Open Sans, sans-serif, Normal';font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal;text-anchor:start;text-align:start;writing-mode:lr;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;"
|
65
|
+
id="text14"
|
66
|
+
class="st6 st7 st8">A reusable Grape JWT authentication concern</text>
|
67
|
+
</g>
|
68
|
+
</svg>
|
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
22
|
spec.require_paths = ['lib']
|
23
23
|
|
24
|
-
spec.add_development_dependency 'bundler', '
|
24
|
+
spec.add_development_dependency 'bundler', '>= 1.16', '< 3'
|
25
25
|
spec.add_development_dependency 'rack', '~> 2.0'
|
26
26
|
spec.add_development_dependency 'rack-test', '~> 0.8.2'
|
27
27
|
spec.add_development_dependency 'rake', '~> 10.0'
|
@@ -12,6 +12,9 @@ module Grape
|
|
12
12
|
# server or a local file. This is naturally only useful if you care about
|
13
13
|
# JSON Web Token which are signed by the RSA algorithm.
|
14
14
|
class RsaPublicKey
|
15
|
+
# A internal exception handling for failed fetch attempts.
|
16
|
+
class FetchError < StandardError; end
|
17
|
+
|
15
18
|
include Singleton
|
16
19
|
|
17
20
|
# Setup all the getters and setters.
|
@@ -63,7 +66,9 @@ module Grape
|
|
63
66
|
raise ArgumentError, 'No URL for RsaPublicKey configured' unless url
|
64
67
|
|
65
68
|
if remote?
|
66
|
-
HTTParty.get(url)
|
69
|
+
res = HTTParty.get(url)
|
70
|
+
raise FetchError, res.inspect unless (200..299).include? res.code
|
71
|
+
res.body
|
67
72
|
else
|
68
73
|
File.read(url)
|
69
74
|
end
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grape-jwt-authentication
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hermann Mayer
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.16'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '3'
|
20
23
|
type: :development
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '1.16'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '3'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: rack
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -227,9 +233,7 @@ files:
|
|
227
233
|
- Rakefile
|
228
234
|
- bin/console
|
229
235
|
- bin/setup
|
230
|
-
- doc/assets/
|
231
|
-
- doc/assets/project.png
|
232
|
-
- doc/assets/project.xcf
|
236
|
+
- doc/assets/project.svg
|
233
237
|
- grape-jwt-authentication.gemspec
|
234
238
|
- lib/grape/jwt/authentication.rb
|
235
239
|
- lib/grape/jwt/authentication/configuration.rb
|
@@ -255,8 +259,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
255
259
|
- !ruby/object:Gem::Version
|
256
260
|
version: '0'
|
257
261
|
requirements: []
|
258
|
-
|
259
|
-
rubygems_version: 2.7.7
|
262
|
+
rubygems_version: 3.0.2
|
260
263
|
signing_key:
|
261
264
|
specification_version: 4
|
262
265
|
summary: A reusable Grape JWT authentication concern
|
data/doc/assets/logo.png
DELETED
Binary file
|
data/doc/assets/project.png
DELETED
Binary file
|
data/doc/assets/project.xcf
DELETED
Binary file
|