googleauth 0.1.0 → 0.16.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +5 -5
  2. data/.github/CODEOWNERS +7 -0
  3. data/.github/CONTRIBUTING.md +74 -0
  4. data/.github/ISSUE_TEMPLATE/bug_report.md +36 -0
  5. data/.github/ISSUE_TEMPLATE/feature_request.md +21 -0
  6. data/.github/ISSUE_TEMPLATE/support_request.md +7 -0
  7. data/.github/renovate.json +6 -0
  8. data/.github/sync-repo-settings.yaml +18 -0
  9. data/.github/workflows/ci.yml +55 -0
  10. data/.github/workflows/release-please.yml +39 -0
  11. data/.gitignore +3 -0
  12. data/.kokoro/populate-secrets.sh +76 -0
  13. data/.kokoro/release.cfg +52 -0
  14. data/.kokoro/release.sh +18 -0
  15. data/.kokoro/trampoline_v2.sh +489 -0
  16. data/.repo-metadata.json +5 -0
  17. data/.rubocop.yml +17 -0
  18. data/.toys/.toys.rb +45 -0
  19. data/.toys/ci.rb +43 -0
  20. data/.toys/kokoro/.toys.rb +66 -0
  21. data/.toys/kokoro/publish-docs.rb +67 -0
  22. data/.toys/kokoro/publish-gem.rb +53 -0
  23. data/.toys/linkinator.rb +43 -0
  24. data/.trampolinerc +48 -0
  25. data/CHANGELOG.md +199 -0
  26. data/CODE_OF_CONDUCT.md +43 -0
  27. data/Gemfile +22 -1
  28. data/{COPYING → LICENSE} +0 -0
  29. data/README.md +140 -17
  30. data/googleauth.gemspec +28 -28
  31. data/integration/helper.rb +31 -0
  32. data/integration/id_tokens/key_source_test.rb +74 -0
  33. data/lib/googleauth.rb +7 -37
  34. data/lib/googleauth/application_default.rb +81 -0
  35. data/lib/googleauth/client_id.rb +104 -0
  36. data/lib/googleauth/compute_engine.rb +73 -26
  37. data/lib/googleauth/credentials.rb +561 -0
  38. data/lib/googleauth/credentials_loader.rb +207 -0
  39. data/lib/googleauth/default_credentials.rb +93 -0
  40. data/lib/googleauth/iam.rb +75 -0
  41. data/lib/googleauth/id_tokens.rb +233 -0
  42. data/lib/googleauth/id_tokens/errors.rb +71 -0
  43. data/lib/googleauth/id_tokens/key_sources.rb +396 -0
  44. data/lib/googleauth/id_tokens/verifier.rb +142 -0
  45. data/lib/googleauth/json_key_reader.rb +50 -0
  46. data/lib/googleauth/scope_util.rb +61 -0
  47. data/lib/googleauth/service_account.rb +177 -67
  48. data/lib/googleauth/signet.rb +69 -8
  49. data/lib/googleauth/stores/file_token_store.rb +65 -0
  50. data/lib/googleauth/stores/redis_token_store.rb +96 -0
  51. data/lib/googleauth/token_store.rb +69 -0
  52. data/lib/googleauth/user_authorizer.rb +285 -0
  53. data/lib/googleauth/user_refresh.rb +129 -0
  54. data/lib/googleauth/version.rb +1 -1
  55. data/lib/googleauth/web_user_authorizer.rb +295 -0
  56. data/spec/googleauth/apply_auth_examples.rb +96 -94
  57. data/spec/googleauth/client_id_spec.rb +160 -0
  58. data/spec/googleauth/compute_engine_spec.rb +125 -55
  59. data/spec/googleauth/credentials_spec.rb +600 -0
  60. data/spec/googleauth/get_application_default_spec.rb +232 -80
  61. data/spec/googleauth/iam_spec.rb +80 -0
  62. data/spec/googleauth/scope_util_spec.rb +77 -0
  63. data/spec/googleauth/service_account_spec.rb +422 -68
  64. data/spec/googleauth/signet_spec.rb +101 -25
  65. data/spec/googleauth/stores/file_token_store_spec.rb +57 -0
  66. data/spec/googleauth/stores/redis_token_store_spec.rb +50 -0
  67. data/spec/googleauth/stores/store_examples.rb +58 -0
  68. data/spec/googleauth/user_authorizer_spec.rb +343 -0
  69. data/spec/googleauth/user_refresh_spec.rb +359 -0
  70. data/spec/googleauth/web_user_authorizer_spec.rb +172 -0
  71. data/spec/spec_helper.rb +51 -10
  72. data/test/helper.rb +33 -0
  73. data/test/id_tokens/key_sources_test.rb +240 -0
  74. data/test/id_tokens/verifier_test.rb +269 -0
  75. metadata +114 -75
  76. data/.travis.yml +0 -18
  77. data/CONTRIBUTING.md +0 -32
  78. data/Rakefile +0 -15
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "googleauth",
3
+ "language": "ruby",
4
+ "distribution-name": "googleauth"
5
+ }
data/.rubocop.yml ADDED
@@ -0,0 +1,17 @@
1
+ inherit_gem:
2
+ google-style: google-style.yml
3
+
4
+ AllCops:
5
+ Exclude:
6
+ - "Rakefile"
7
+ - "integration/**/*"
8
+ - "rakelib/**/*"
9
+ - "spec/**/*"
10
+ - "test/**/*"
11
+ Metrics/ClassLength:
12
+ Max: 200
13
+ Metrics/ModuleLength:
14
+ Max: 110
15
+ Metrics/BlockLength:
16
+ Exclude:
17
+ - "googleauth.gemspec"
data/.toys/.toys.rb ADDED
@@ -0,0 +1,45 @@
1
+ # Copyright 2021 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ expand :clean, paths: :gitignore
16
+
17
+ expand :rspec do |t|
18
+ t.libs = ["lib", "spec"]
19
+ t.use_bundler
20
+ end
21
+
22
+ expand :minitest do |t|
23
+ t.libs = ["lib", "test"]
24
+ t.use_bundler
25
+ t.files = "test/**/*_test.rb"
26
+ end
27
+
28
+ expand :minitest do |t|
29
+ t.name = "integration"
30
+ t.libs = ["lib", "integration"]
31
+ t.use_bundler
32
+ t.files = "integration/**/*_test.rb"
33
+ end
34
+
35
+ expand :rubocop, bundler: true
36
+
37
+ expand :yardoc do |t|
38
+ t.generate_output_flag = true
39
+ # t.fail_on_warning = true
40
+ t.use_bundler
41
+ end
42
+
43
+ expand :gem_build
44
+
45
+ expand :gem_build, name: "install", install_gem: true
data/.toys/ci.rb ADDED
@@ -0,0 +1,43 @@
1
+ # Copyright 2021 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ desc "Run CI checks"
16
+
17
+ TESTS = ["test", "integration", "spec", "rubocop", "yardoc", "build", "linkinator"]
18
+
19
+ flag :only
20
+ TESTS.each do |name|
21
+ flag "include_#{name}".to_sym, "--[no-]include-#{name}"
22
+ end
23
+
24
+ include :exec, result_callback: :handle_result
25
+ include :terminal
26
+
27
+ def handle_result result
28
+ if result.success?
29
+ puts "** #{result.name} passed\n\n", :green, :bold
30
+ else
31
+ puts "** CI terminated: #{result.name} failed!", :red, :bold
32
+ exit 1
33
+ end
34
+ end
35
+
36
+ def run
37
+ ::Dir.chdir context_directory
38
+ TESTS.each do |name|
39
+ setting = get "include_#{name}".to_sym
40
+ setting = !only if setting.nil?
41
+ exec ["toys", name], name: name.capitalize if setting
42
+ end
43
+ end
@@ -0,0 +1,66 @@
1
+ # Copyright 2021 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ mixin "kokoro-tools" do
16
+ def load_env
17
+ return if defined? @loaded_env
18
+
19
+ service_account = "#{::ENV['KOKORO_GFILE_DIR']}/service-account.json"
20
+ raise "#{service_account} is not a file" unless ::File.file? service_account
21
+ ::ENV["GOOGLE_APPLICATION_CREDENTIALS"] = service_account
22
+
23
+ filename = "#{::ENV['KOKORO_GFILE_DIR']}/ruby_env_vars.json"
24
+ raise "#{filename} is not a file" unless ::File.file? filename
25
+ env_vars = ::JSON.parse ::File.read filename
26
+ env_vars.each { |k, v| ::ENV[k] = v }
27
+
28
+ ::ENV["DOCS_CREDENTIALS"] ||= "#{::ENV['KOKORO_KEYSTORE_DIR']}/73713_docuploader_service_account"
29
+ ::ENV["GITHUB_TOKEN"] ||= "#{::ENV['KOKORO_KEYSTORE_DIR']}/73713_yoshi-automation-github-key"
30
+
31
+ @loaded_env = true
32
+ end
33
+
34
+ def package_name
35
+ @package_name ||=
36
+ ::ENV["RELEASE_PACKAGE"] || ::ENV["PACKAGE"] || begin
37
+ files = ::Dir.glob("*.gemspec")
38
+ raise "Unable to determine package" unless files.length == 1
39
+ ::File.basename files.first, ".gemspec"
40
+ end
41
+ end
42
+
43
+ def package_directory
44
+ @package_directory ||= begin
45
+ if ::File.file? "#{package_name}.gemspec"
46
+ ::File.expand_path "."
47
+ elsif ::File.file? "#{package_name}/#{package_name}.gemspec"
48
+ ::File.expand_path package_name
49
+ else
50
+ raise "Unable to determine package directory"
51
+ end
52
+ end
53
+ end
54
+
55
+ def package_gemspec_path
56
+ @package_gemspec_path ||= ::File.join package_directory, "#{package_name}.gemspec"
57
+ end
58
+
59
+ def package_gemspec
60
+ @package_gemspec ||= eval ::File.read package_gemspec_path
61
+ end
62
+
63
+ def package_version
64
+ @package_version ||= package_gemspec.version
65
+ end
66
+ end
@@ -0,0 +1,67 @@
1
+ # Copyright 2021 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require "json"
16
+
17
+ include "kokoro-tools"
18
+ include :exec, e: true
19
+ include :fileutils
20
+
21
+ flag :credentials, "--credentials=PATH"
22
+ flag :bucket, "--bucket=NAME"
23
+ flag :dry_run, default: ["true", "docs"].include?(::ENV["RELEASE_DRY_RUN"].to_s)
24
+
25
+ def run
26
+ ::Dir.chdir package_directory
27
+ load_env
28
+ build_docs
29
+ write_metadata
30
+ if dry_run
31
+ puts "DRY RUN: Skipping doc uploading for #{package_name}"
32
+ else
33
+ upload_docs
34
+ end
35
+ end
36
+
37
+ def build_docs
38
+ rm_rf "doc"
39
+ exec ["toys", "yardoc"]
40
+ end
41
+
42
+ def write_metadata
43
+ allowed_fields = [
44
+ "name", "version", "language", "distribution-name",
45
+ "product-page", "github-repository", "issue-tracker"
46
+ ]
47
+ metadata = ::JSON.parse ::File.read ".repo-metadata.json"
48
+ metadata.transform_keys! { |k| k.tr "_", "-" }
49
+ metadata.keep_if { |k, _v| allowed_fields.include? k }
50
+ metadata["version"] = package_version
51
+ metadata["name"] = metadata["distribution-name"]
52
+ args = metadata.transform_keys { |k| "--#{k}" }.to_a.flatten
53
+ cmd = ["python3", "-m", "docuploader", "create-metadata"] + args
54
+ exec cmd, chdir: "doc"
55
+ end
56
+
57
+ def upload_docs
58
+ creds = credentials || "#{::ENV['KOKORO_KEYSTORE_DIR']}/73713_docuploader_service_account"
59
+ buck = bucket || ::ENV["STAGING_BUCKET"] || "docs-staging"
60
+ cmd = [
61
+ "python3", "-m", "docuploader", "upload", ".",
62
+ "--credentials=#{creds}",
63
+ "--staging-bucket=#{buck}",
64
+ "--metadata-file=./docs.metadata"
65
+ ]
66
+ exec cmd, chdir: "doc"
67
+ end
@@ -0,0 +1,53 @@
1
+ # Copyright 2021 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ include "kokoro-tools"
16
+ include :exec, e: true
17
+ include :fileutils
18
+ include :gems
19
+
20
+ flag :rubygems_token, "--rubygems-token=TOKEN"
21
+ flag :dry_run, default: ["true", "gem"].include?(::ENV["RELEASE_DRY_RUN"].to_s)
22
+
23
+ def run
24
+ gem "gems", "~> 1.2"
25
+ require "gems"
26
+ ::Dir.chdir package_directory
27
+ load_env
28
+ configure_gems
29
+ gem_path = build_gem
30
+ if dry_run
31
+ puts "DRY RUN: Skipping Rubygems push of #{gem_path}"
32
+ else
33
+ push_gem gem_path
34
+ end
35
+ end
36
+
37
+ def configure_gems
38
+ token = rubygems_token || ::ENV["RUBYGEMS_API_TOKEN"]
39
+ ::Gems.configure { |config| config.key = token } if token
40
+ end
41
+
42
+ def build_gem
43
+ gem_path = "pkg/#{package_name}-#{package_version}.gem"
44
+ rm_rf gem_path
45
+ exec ["toys", "build"]
46
+ gem_path
47
+ end
48
+
49
+ def push_gem gem_path
50
+ response = ::Gems.push ::File.new gem_path
51
+ puts response
52
+ raise "Gem push didn't report success" unless response.include? "Successfully registered gem:"
53
+ end
@@ -0,0 +1,43 @@
1
+ # Copyright 2021 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ desc "Run Link checks"
16
+
17
+ flag :install, desc: "Install linkinator instead of running checks"
18
+
19
+ include :exec, e: true
20
+ include :terminal
21
+
22
+ def run
23
+ ::Dir.chdir context_directory
24
+ if install
25
+ Kernel.exec "npm install linkinator"
26
+ else
27
+ exec_tool ["yardoc"]
28
+ check_links
29
+ end
30
+ end
31
+
32
+ def check_links
33
+ result = exec ["npx", "linkinator", "./doc"], out: :capture
34
+ puts result.captured_out
35
+ checked_links = result.captured_out.split "\n"
36
+ checked_links.select! { |link| link =~ /^\[(\d+)\]/ && ::Regexp.last_match[1] != "200" }
37
+ unless checked_links.empty?
38
+ checked_links.each do |link|
39
+ puts link, :yellow
40
+ end
41
+ exit 1
42
+ end
43
+ end
data/.trampolinerc ADDED
@@ -0,0 +1,48 @@
1
+ # Copyright 2021 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ # Add required env vars here.
16
+ required_envvars+=(
17
+ )
18
+
19
+ # Add env vars which are passed down into the container here.
20
+ pass_down_envvars+=(
21
+ "AUTORELEASE_PR" "RELEASE_DRY_RUN"
22
+ )
23
+
24
+ # Prevent unintentional override on the default image.
25
+ if [[ "${TRAMPOLINE_IMAGE_UPLOAD:-false}" == "true" ]] && [[ -z "${TRAMPOLINE_IMAGE:-}" ]]; then
26
+ echo "Please set TRAMPOLINE_IMAGE if you want to upload the Docker image."
27
+ exit 1
28
+ fi
29
+
30
+ # Define the default value if it makes sense.
31
+ if [[ -z "${TRAMPOLINE_IMAGE_UPLOAD:-}" ]]; then
32
+ TRAMPOLINE_IMAGE_UPLOAD=""
33
+ fi
34
+
35
+ if [[ -z "${TRAMPOLINE_IMAGE:-}" ]]; then
36
+ TRAMPOLINE_IMAGE=""
37
+ fi
38
+
39
+ if [[ -z "${TRAMPOLINE_DOCKERFILE:-}" ]]; then
40
+ TRAMPOLINE_DOCKERFILE=""
41
+ fi
42
+
43
+ if [[ -z "${TRAMPOLINE_BUILD_FILE:-}" ]]; then
44
+ TRAMPOLINE_BUILD_FILE=""
45
+ fi
46
+
47
+ # Secret Manager secrets.
48
+ source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh
data/CHANGELOG.md ADDED
@@ -0,0 +1,199 @@
1
+ # Release History
2
+
3
+ ### [0.16.2](https://www.github.com/googleapis/google-auth-library-ruby/compare/google-auth-library-ruby/v0.16.1...google-auth-library-ruby/v0.16.2) (2021-04-28)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * Stop attempting to get the project from gcloud when applying self-signed JWTs ([#317](https://www.github.com/googleapis/google-auth-library-ruby/issues/317)) ([39258ca](https://www.github.com/googleapis/google-auth-library-ruby/commit/39258cacafa5c770fb40d99075a97b8e6427adba))
9
+
10
+ ### [0.16.1](https://www.github.com/googleapis/google-auth-library-ruby/compare/google-auth-library-ruby/v0.16.0...google-auth-library-ruby/v0.16.1) (2021-04-01)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * Accept application/text content-type for plain idtoken response ([4948ebb](https://www.github.com/googleapis/google-auth-library-ruby/commit/4948ebb3ca151e9f0433585a41bad6f415416b2d))
16
+
17
+ ## [0.16.0](https://www.github.com/googleapis/google-auth-library-ruby/compare/v0.15.1...v0.16.0) (2021-03-04)
18
+
19
+
20
+ ### Features
21
+
22
+ * Drop support for Ruby 2.4 and add support for Ruby 3.0 ([6644806](https://www.github.com/googleapis/google-auth-library-ruby/commit/6644806ab47cea6d08e1901c2ed808e53a579bc3))
23
+
24
+ ## [0.15.1](https://www.github.com/googleapis/google-auth-library-ruby/compare/v0.15.0...v0.15.1) (2021-02-08)
25
+
26
+
27
+ ### Bug Fixes
28
+
29
+ * Fix crash when using a client credential without any paths or env_vars set ([#296](https://www.github.com/googleapis/google-auth-library-ruby/issues/296)) ([c971c1a](https://www.github.com/googleapis/google-auth-library-ruby/commit/c971c1ad2d7730c0f5b389d533a972be32fbaf49))
30
+
31
+ ## [0.15.0](https://www.github.com/googleapis/google-auth-library-ruby/compare/v0.14.0...v0.15.0) (2021-01-26)
32
+
33
+
34
+ ### Features
35
+
36
+ * Credential parameters inherit from superclasses ([4fa4720](https://www.github.com/googleapis/google-auth-library-ruby/commit/4fa47206dbd62f8bbdd1b9d3721f6baee9fd1d62))
37
+ * Service accounts apply a self-signed JWT if scopes are marked as default ([d22acb8](https://www.github.com/googleapis/google-auth-library-ruby/commit/d22acb8a510e6711b5674545c31a4816e5a9168f))
38
+
39
+
40
+ ### Bug Fixes
41
+
42
+ * Retry fetch_access_token when GCE metadata server returns unexpected errors ([cd9b012](https://www.github.com/googleapis/google-auth-library-ruby/commit/cd9b0126d3419b9953982f71edc9e6ba3f640e3c))
43
+ * Support correct service account and user refresh behavior for custom credential env variables ([d2dffe5](https://www.github.com/googleapis/google-auth-library-ruby/commit/d2dffe592112b45006291ad9a57f56e00fb208c3))
44
+
45
+ ## 0.14.0 / 2020-10-09
46
+
47
+ * Honor GCE_METADATA_HOST environment variable
48
+ * Fix errors in some environments when requesting an access token for multiple scopes
49
+
50
+ ## 0.13.1 / 2020-07-30
51
+
52
+ * Support scopes when using GCE Metadata Server authentication ([@ball-hayden][])
53
+
54
+ ## 0.13.0 / 2020-06-17
55
+
56
+ * Support for validating ID tokens.
57
+ * Fixed header application of ID tokens from service accounts.
58
+
59
+ ## 0.12.0 / 2020-04-08
60
+
61
+ * Support for ID token credentials.
62
+ * Support reading quota_id_project from service account credentials.
63
+
64
+ ## 0.11.0 / 2020-02-24
65
+
66
+ * Support Faraday 1.x.
67
+ * Allow special "postmessage" value for redirect_uri.
68
+
69
+ ## 0.10.0 / 2019-10-09
70
+
71
+ Note: This release now requires Ruby 2.4 or later
72
+
73
+ * Increase metadata timeout to improve reliability in some hosting environments
74
+ * Support an environment variable to suppress Cloud SDK credentials warnings
75
+ * Make the header check case insensitive
76
+ * Set instance variables at initialization to avoid spamming warnings
77
+ * Pass "Metadata-Flavor" header to metadata server when checking for GCE
78
+
79
+ ## 0.9.0 / 2019-08-05
80
+
81
+ * Restore compatibility with Ruby 2.0. This is the last release that will work on end-of-lifed versions of Ruby. The 0.10 release will require Ruby 2.4 or later.
82
+ * Update Credentials to use methods for values that are intended to be changed by users, replacing constants.
83
+ * Add retry on error for fetch_access_token
84
+ * Allow specifying custom state key-values
85
+ * Add verbosity none to gcloud command
86
+ * Make arity of WebUserAuthorizer#get_credentials compatible with the base class
87
+
88
+ ## 0.8.1 / 2019-03-27
89
+
90
+ * Silence unnecessary gcloud warning
91
+ * Treat empty credentials environment variables as unset
92
+
93
+ ## 0.8.0 / 2019-01-02
94
+
95
+ * Support connection options :default_connection and :connection_builder when creating credentials that need to refresh OAuth tokens. This lets clients provide connection objects with custom settings, such as proxies, needed for the client environment.
96
+ * Removed an unnecessary warning about project IDs.
97
+
98
+ ## 0.7.1 / 2018-10-25
99
+
100
+ * Make load_gcloud_project_id module function.
101
+
102
+ ## 0.7.0 / 2018-10-24
103
+
104
+ * Add project_id instance variable to UserRefreshCredentials, ServiceAccountCredentials, and Credentials.
105
+
106
+ ## 0.6.7 / 2018-10-16
107
+
108
+ * Update memoist dependency to ~> 0.16.
109
+
110
+ ## 0.6.6 / 2018-08-22
111
+
112
+ * Remove ruby version warnings.
113
+
114
+ ## 0.6.5 / 2018-08-16
115
+
116
+ * Fix incorrect http verb when revoking credentials.
117
+ * Warn on EOL ruby versions.
118
+
119
+ ## 0.6.4 / 2018-08-03
120
+
121
+ * Resolve issue where DefaultCredentials constant was undefined.
122
+
123
+ ## 0.6.3 / 2018-08-02
124
+
125
+ * Resolve issue where token_store was being written to twice
126
+
127
+ ## 0.6.2 / 2018-08-01
128
+
129
+ * Add warning when using cloud sdk credentials
130
+
131
+ ## 0.6.1 / 2017-10-18
132
+
133
+ * Fix file permissions
134
+
135
+ ## 0.6.0 / 2017-10-17
136
+
137
+ * Support ruby-jwt 2.0
138
+ * Add simple credentials class
139
+
140
+ ## 0.5.3 / 2017-07-21
141
+
142
+ * Fix file permissions on the gem's `.rb` files.
143
+
144
+ ## 0.5.2 / 2017-07-19
145
+
146
+ * Add retry mechanism when fetching access tokens in `GCECredentials` and `UserRefreshCredentials` classes.
147
+ * Update Google API OAuth2 token credential URI to v4.
148
+
149
+ ## 0.5.1 / 2016-01-06
150
+
151
+ * Change header name emitted by `Client#apply` from "Authorization" to "authorization" ([@murgatroid99][])
152
+ * Fix ADC not working on some windows machines ([@vsubramani][])
153
+ [#55](https://github.com/google/google-auth-library-ruby/issues/55)
154
+
155
+ ## 0.5.0 / 2015-10-12
156
+
157
+ * Initial support for user credentials ([@sqrrrl][])
158
+ * Update Signet to 0.7
159
+
160
+ ## 0.4.2 / 2015-08-05
161
+
162
+ * Updated UserRefreshCredentials hash to use string keys ([@haabaato][])
163
+ [#36](https://github.com/google/google-auth-library-ruby/issues/36)
164
+
165
+ * Add support for a system default credentials file. ([@mr-salty][])
166
+ [#33](https://github.com/google/google-auth-library-ruby/issues/33)
167
+
168
+ * Fix bug when loading credentials from ENV ([@dwilkie][])
169
+ [#31](https://github.com/google/google-auth-library-ruby/issues/31)
170
+
171
+ * Relax the constraint of dependent version of multi_json ([@igrep][])
172
+ [#30](https://github.com/google/google-auth-library-ruby/issues/30)
173
+
174
+ * Enables passing credentials via environment variables. ([@haabaato][])
175
+ [#27](https://github.com/google/google-auth-library-ruby/issues/27)
176
+
177
+ ## 0.4.1 / 2015-04-25
178
+
179
+ * Improves handling of --no-scopes GCE authorization ([@tbetbetbe][])
180
+ * Refactoring and cleanup ([@joneslee85][])
181
+
182
+ ## 0.4.0 / 2015-03-25
183
+
184
+ * Adds an implementation of JWT header auth ([@tbetbetbe][])
185
+
186
+ ## 0.3.0 / 2015-03-23
187
+
188
+ * makes the scope parameter's optional in all APIs. ([@tbetbetbe][])
189
+ * changes the scope parameter's position in various constructors. ([@tbetbetbe][])
190
+
191
+ [@dwilkie]: https://github.com/dwilkie
192
+ [@haabaato]: https://github.com/haabaato
193
+ [@igrep]: https://github.com/igrep
194
+ [@joneslee85]: https://github.com/joneslee85
195
+ [@mr-salty]: https://github.com/mr-salty
196
+ [@tbetbetbe]: https://github.com/tbetbetbe
197
+ [@murgatroid99]: https://github.com/murgatroid99
198
+ [@vsubramani]: https://github.com/vsubramani
199
+ [@ball-hayden]: https://github.com/ball-hayden