Skip to content
Open
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
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ jobs:
strategy:
matrix:
include:
- os: ubuntu-22.04
ruby: "3.1"
task: test , spec
- os: ubuntu-22.04
ruby: "3.2"
task: test , spec
Expand All @@ -25,14 +22,17 @@ jobs:
- os: ubuntu-latest
ruby: "3.4"
task: test , spec
- os: ubuntu-latest
ruby: "4.0"
task: test , spec
- os: macos-latest
ruby: "3.4"
ruby: "4.0"
task: test , spec
- os: windows-latest
ruby: "3.4"
ruby: "4.0"
task: test , spec
- os: ubuntu-latest
ruby: "3.4"
ruby: "4.0"
task: rubocop , integration , build , yardoc , linkinator
fail-fast: false
runs-on: ${{ matrix.os }}
Expand Down
6 changes: 5 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@ gemspec

gem "fakefs", ">= 1.0", "< 4"
gem "fakeredis", "~> 0.5"
gem "fiddle", "~> 1.1"
gem "gems", "~> 1.2"
gem "google-style", "~> 1.30.1"
gem "google-style", "~> 1.32.0"
gem "irb", "~> 1.17"
gem "logging", "~> 2.0"
gem "minitest", "~> 5.14"
gem "minitest-focus", "~> 1.1"
gem "pstore", "~> 0.2.1"
gem "rack-test", "~> 2.0"
gem "redcarpet", "~> 3.0"
gem "redis", ">= 4.0", "< 6"
gem "rspec", "~> 3.0"
gem "syslog", "~> 0.4.0"
gem "webmock", "~> 3.8"
gem "yard", "~> 0.9"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ Custom storage implementations can also be used. See

## Supported Ruby Versions

This library is supported on Ruby 3.0+.
This library is supported on Ruby 3.2+.

Google provides official support for Ruby versions that are actively supported
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
Expand Down
2 changes: 1 addition & 1 deletion googleauth.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Gem::Specification.new do |gem|
gem.require_paths = ["lib"]

gem.platform = Gem::Platform::RUBY
gem.required_ruby_version = ">= 3.0"
gem.required_ruby_version = ">= 3.2"

gem.add_dependency "faraday", ">= 1.0", "< 3.a"
gem.add_dependency "google-cloud-env", "~> 2.2"
Expand Down
2 changes: 1 addition & 1 deletion lib/googleauth/id_tokens/key_sources.rb
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,13 @@ def extract_rsa_key jwk
rsa_key.public_key
end

# @private
CURVE_NAME_MAP = {
"P-256" => "prime256v1",
"P-384" => "secp384r1",
"P-521" => "secp521r1",
"secp256k1" => "secp256k1"
}.freeze
private_constant :CURVE_NAME_MAP

def extract_ec_key jwk
begin
Expand Down
6 changes: 3 additions & 3 deletions lib/googleauth/id_tokens/verifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,13 @@ def normalize_and_verify_payload payload, aud, azp, iss
payload["azp"] ||= payload["cid"] if payload.key? "cid"

# Payload content validation
if aud && (Array(aud) & Array(payload["aud"])).empty?
if aud && !Array(aud).intersect?(Array(payload["aud"]))
raise AudienceMismatchError, "Token aud mismatch: #{payload['aud']}"
end
if azp && (Array(azp) & Array(payload["azp"])).empty?
if azp && !Array(azp).intersect?(Array(payload["azp"]))
raise AuthorizedPartyMismatchError, "Token azp mismatch: #{payload['azp']}"
end
if iss && (Array(iss) & Array(payload["iss"])).empty?
if iss && !Array(iss).intersect?(Array(payload["iss"]))
raise IssuerMismatchError, "Token iss mismatch: #{payload['iss']}"
end

Expand Down
Loading