Skip to content

Commit

Permalink
Bump jwt to version ~> 2.1
Browse files Browse the repository at this point in the history
2.0.0+ enforce an integer in the payload's exp parameter. One test used
an expiration time of 0.01 to simulate an already-expired token, which
triggered the raise added in jwt/ruby-jwt#205. A value of -1
accomplishes the same thing and allows the test to pass.
  • Loading branch information
jbhannah authored and waiting-for-dev committed Oct 23, 2017
1 parent 2a005b7 commit 9850b95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spec/warden/jwt_auth/token_revoker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
end

context 'when token is expired' do
before { Warden::JWTAuth.config.expiration_time = 0.01 }
before { Warden::JWTAuth.config.expiration_time = -1 }

it 'silently ignores it' do
expect { described_class.new.call(token) }.not_to raise_error
Expand Down
2 changes: 1 addition & 1 deletion warden-jwt_auth.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Gem::Specification.new do |spec|

spec.add_dependency 'dry-configurable', '~> 0.5'
spec.add_dependency 'dry-auto_inject', '~> 0.4'
spec.add_dependency 'jwt', '~> 1.5'
spec.add_dependency 'jwt', '~> 2.1'
spec.add_dependency 'warden', '~> 1.2'

spec.add_development_dependency "bundler", "~> 1.12"
Expand Down

0 comments on commit 9850b95

Please sign in to comment.