Skip to content

Commit

Permalink
follow jwt 2.9.0 changes (#464)
Browse files Browse the repository at this point in the history
* follow jwt 2.9.0 changes

* bump gem version & required ruby version
  • Loading branch information
nov authored Sep 16, 2024
1 parent 827978d commit 405db19
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion lib/omniauth/google_oauth2/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module OmniAuth
module GoogleOauth2
VERSION = '1.1.3'
VERSION = '1.2.0'
end
end
22 changes: 11 additions & 11 deletions lib/omniauth/strategies/google_oauth2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,17 @@ def authorize_params

# We have to manually verify the claims because the third parameter to
# JWT.decode is false since no verification key is provided.
::JWT::Verify.verify_claims(decoded,
verify_iss: true,
iss: ALLOWED_ISSUERS,
verify_aud: true,
aud: options.client_id,
verify_sub: false,
verify_expiration: true,
verify_not_before: true,
verify_iat: false,
verify_jti: false,
leeway: options[:jwt_leeway])
::JWT::Claims.verify!(decoded,
verify_iss: true,
iss: ALLOWED_ISSUERS,
verify_aud: true,
aud: options.client_id,
verify_sub: false,
verify_expiration: true,
verify_not_before: true,
verify_iat: false,
verify_jti: false,
leeway: options[:jwt_leeway])

hash[:id_info] = decoded
end
Expand Down
4 changes: 2 additions & 2 deletions omniauth-google-oauth2.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ Gem::Specification.new do |gem|
gem.files = `git ls-files`.split("\n")
gem.require_paths = ['lib']

gem.required_ruby_version = '>= 2.2'
gem.required_ruby_version = '>= 2.5'

gem.add_runtime_dependency 'jwt', '>= 2.0'
gem.add_runtime_dependency 'jwt', '>= 2.9'
gem.add_runtime_dependency 'oauth2', '~> 2.0'
gem.add_runtime_dependency 'omniauth', '~> 2.0'
gem.add_runtime_dependency 'omniauth-oauth2', '~> 1.8'
Expand Down

0 comments on commit 405db19

Please sign in to comment.