Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ source 'https://rubygems.org'

gemspec

gem 'jwt', '~> 2'
gem 'jwt', '>= 2', '< 4'
gem 'rake', '~> 13'

group :development do
Expand Down
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PATH
remote: .
specs:
omniauth-auth0 (3.2.0)
jwt (~> 2)
jwt (>= 2, < 4)
omniauth (~> 2)
omniauth-oauth2 (~> 1)

Expand Down Expand Up @@ -55,7 +55,7 @@ GEM
logger
io-console (0.8.2)
json (2.19.5)
jwt (2.10.2)
jwt (3.2.0)
base64
language_server-protocol (3.17.0.5)
lint_roller (1.1.0)
Expand Down Expand Up @@ -195,7 +195,7 @@ DEPENDENCIES
bundler
dotenv (~> 2)
guard-rspec (~> 4)
jwt (~> 2)
jwt (>= 2, < 4)
listen (~> 3)
multi_json (~> 1)
omniauth-auth0!
Expand Down
2 changes: 1 addition & 1 deletion omniauth-auth0.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ omniauth-auth0 is the OmniAuth strategy for Auth0.
s.executables = `git ls-files -- bin/*`.split('\n').map{ |f| File.basename(f) }

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct observation, but this line is pre-existing upstream code (verbatim from auth0/omniauth-auth0, untouched by this PR) and has no effect: the gem ships no bin/ files, so git ls-files -- bin/* is empty and the split returns [] regardless of the delimiter. Leaving it as-is to keep the fork's diff from upstream minimal — worth fixing upstream if anyone ever adds an executable.

s.require_paths = ['lib']

s.add_runtime_dependency 'jwt', '~> 2'
s.add_runtime_dependency 'jwt', '>= 2', '< 4'
s.add_runtime_dependency 'omniauth', '~> 2'
s.add_runtime_dependency 'omniauth-oauth2', '~> 1'

Expand Down
7 changes: 6 additions & 1 deletion spec/omniauth/auth0/jwt_validator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,12 @@
iat: past_timecode,
aud: client_id
}
token = make_rs256_token(payload) + 'bad'
# Swap in a signature from a different payload so the segment stays
# valid base64 (JWT 3.x raises Base64DecodeError before verifying
# otherwise) but no longer matches the token.
header_segment, payload_segment, _signature = make_rs256_token(payload).split('.')
other_signature = make_rs256_token(payload.merge(sub: 'other')).split('.').last
token = [header_segment, payload_segment, other_signature].join('.')
expect do
verified_token = make_jwt_validator(opt_domain: domain).verify(token)
end.to raise_error(an_instance_of(JWT::VerificationError).and having_attributes({
Expand Down
Loading