warden-jwt_auth 0.3.5 → 0.3.6

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
- SHA1:
3
- metadata.gz: 581e544d6b6fccb8635aac2719efefbbb5b760e8
4
- data.tar.gz: e36d38d069f456bccc0b8eece033c7419da005ac
2
+ SHA256:
3
+ metadata.gz: 16389e83d59158a9bdc25ed6b00032ae06f9e11fd1bc4f2423354378c9666ca4
4
+ data.tar.gz: 6154a01b1e2bbb9d072819e711148535c6b2104dfa028afb1c10e9ad6bff0004
5
5
  SHA512:
6
- metadata.gz: e8b1e212fa604ed3b2af19aa44392c625f6192869750d479be7af50f0c426c5961fa91497d95385d5bfa452b528fadf474283f744880debba8547c7d16329177
7
- data.tar.gz: 67a9837cc9c55f1fd4cf1970d1891e68c3e59a8262e4161835e398b827fc1074b5f8df9ba3121196dec197e51237c024b0f708139e633437e4c0ba547c101385
6
+ metadata.gz: c5fd71f3387c981a676968e118523a9a28ff0b2dc22e610133bc78a6128539a7ca4094927388fe66aea3cfddaffb3cd95c17a46ca10032aea29c2095675c82b5
7
+ data.tar.gz: bc48403765c5e3dc6426559b793b3f8e78a51e6e2953262b42a2b8d0cec0a09380e3fa610ec8bb2efe2c27e29d7eec332f187e88d896b0371a6d7b3bf9155fe9
@@ -1,9 +1,9 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.2.6
5
- - 2.3.3
6
- - 2.4.0
4
+ - 2.4
5
+ - 2.5
6
+ - 2.6
7
7
  before_install:
8
8
  - gem update --system --no-doc
9
9
  - bundle install --gemfile=.overcommit_gems.rb
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/).
6
6
 
7
+ ## [0.3.6] - 2019-04-29
8
+ ### Fixed
9
+ - Update depencies.
10
+
7
11
  ## [0.3.5] - 2018-01-30
8
12
  ### Fixed
9
13
  - Do not disallow fetching JWT scopes from session
@@ -0,0 +1,25 @@
1
+ Please, for a bug report fill in the following template. Before that, make sure to read the whole [README](https://github.com/waiting-for-dev/warden-jwt_auth/blob/master/README.md).
2
+
3
+ Feature requests and questions about `warden-jwt_auth` are also accepted.
4
+
5
+ ## Expected behavior
6
+
7
+ ## Actual behavior
8
+
9
+ ## Steps to Reproduce the Problem
10
+
11
+ 1.
12
+ 2.
13
+ 3.
14
+
15
+ ## Debugging information
16
+
17
+ Provide following information. Please, format pasted output as code. Feel free to remove the secret key value.
18
+
19
+ - Version of `warden-jwt_auth` in use
20
+ - Output of `Warden::JWTAuth.config`
21
+ - If your issue is related with not getting a JWT from the server:
22
+ - Involved request path, method and request headers
23
+ - Response headers for that request
24
+ - If your issue is related with not being able to revoke a JWT:
25
+ - Involved request path, method and request headers
@@ -16,6 +16,7 @@ module Warden
16
16
  def self.from_env(env)
17
17
  auth = EnvHelper.authorization_header(env)
18
18
  return nil unless auth
19
+
19
20
  method, token = auth.split
20
21
  method == METHOD ? token : nil
21
22
  end
@@ -24,6 +24,7 @@ module Warden
24
24
  env = auth.env
25
25
  scope = opts[:scope]
26
26
  return unless token_should_be_added?(scope, env)
27
+
27
28
  add_token_to_env(user, scope, env)
28
29
  end
29
30
 
@@ -30,6 +30,7 @@ module Warden
30
30
  path_info = EnvHelper.path_info(env)
31
31
  method = EnvHelper.request_method(env)
32
32
  return unless token && token_should_be_revoked?(path_info, method)
33
+
33
34
  TokenRevoker.new.call(token)
34
35
  end
35
36
 
@@ -39,6 +39,7 @@ module Warden
39
39
  sub = user.jwt_subject
40
40
  payload = { 'sub' => String(sub), 'scp' => scope.to_s }
41
41
  return payload unless user.respond_to?(:jwt_payload)
42
+
42
43
  user.jwt_payload.merge(payload)
43
44
  end
44
45
  end
@@ -46,6 +46,7 @@ module Warden
46
46
 
47
47
  def check_valid_user(payload, user, scope)
48
48
  raise Errors::NilUser, 'nil user' unless user
49
+
49
50
  strategy = revocation_strategies[scope]
50
51
  raise Errors::RevokedToken, 'revoked token' if strategy.jwt_revoked?(payload, user)
51
52
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Warden
4
4
  module JWTAuth
5
- VERSION = '0.3.5'
5
+ VERSION = '0.3.6'
6
6
  end
7
7
  end
@@ -19,17 +19,17 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_dependency 'dry-configurable', '~> 0.5'
23
- spec.add_dependency 'dry-auto_inject', '~> 0.4'
22
+ spec.add_dependency 'dry-configurable', '~> 0.8'
23
+ spec.add_dependency 'dry-auto_inject', '~> 0.6'
24
24
  spec.add_dependency 'jwt', '~> 2.1'
25
25
  spec.add_dependency 'warden', '~> 1.2'
26
26
 
27
- spec.add_development_dependency "bundler", "~> 1.12"
28
- spec.add_development_dependency "rake", "~> 10.0"
29
- spec.add_development_dependency "rspec", "~> 3.0"
30
- spec.add_development_dependency "rack-test", "~> 0.6"
31
- spec.add_development_dependency "pry-byebug", "~> 3.4"
27
+ spec.add_development_dependency "bundler"
28
+ spec.add_development_dependency "rake", "~> 12.3"
29
+ spec.add_development_dependency "rspec", "~> 3.8"
30
+ spec.add_development_dependency "rack-test", "~> 1.1"
31
+ spec.add_development_dependency "pry-byebug", "~> 3.7"
32
32
  # Test reporting
33
- spec.add_development_dependency 'simplecov', '~> 0.13'
33
+ spec.add_development_dependency 'simplecov', '~> 0.16'
34
34
  spec.add_development_dependency 'codeclimate-test-reporter', '~> 1.0'
35
- end
35
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: warden-jwt_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marc Busqué
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-30 00:00:00.000000000 Z
11
+ date: 2019-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-configurable
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.5'
19
+ version: '0.8'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.5'
26
+ version: '0.8'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: dry-auto_inject
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.4'
33
+ version: '0.6'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0.4'
40
+ version: '0.6'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: jwt
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -70,86 +70,86 @@ dependencies:
70
70
  name: bundler
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: '1.12'
75
+ version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: '1.12'
82
+ version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rake
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '10.0'
89
+ version: '12.3'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '10.0'
96
+ version: '12.3'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rspec
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '3.0'
103
+ version: '3.8'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '3.0'
110
+ version: '3.8'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rack-test
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '0.6'
117
+ version: '1.1'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '0.6'
124
+ version: '1.1'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: pry-byebug
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '3.4'
131
+ version: '3.7'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '3.4'
138
+ version: '3.7'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: simplecov
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '0.13'
145
+ version: '0.16'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: '0.13'
152
+ version: '0.16'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: codeclimate-test-reporter
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -190,6 +190,7 @@ files:
190
190
  - bin/console
191
191
  - bin/setup
192
192
  - docker-compose.yml
193
+ - issue_template.md
193
194
  - lib/warden/jwt_auth.rb
194
195
  - lib/warden/jwt_auth/env_helper.rb
195
196
  - lib/warden/jwt_auth/errors.rb
@@ -228,7 +229,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
228
229
  version: '0'
229
230
  requirements: []
230
231
  rubyforge_project:
231
- rubygems_version: 2.6.8
232
+ rubygems_version: 2.7.8
232
233
  signing_key:
233
234
  specification_version: 4
234
235
  summary: JWT authentication for Warden.