googleauth 1.8.0 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/googleauth/application_default.rb +3 -3
- data/lib/googleauth/client_id.rb +0 -1
- data/lib/googleauth/credentials.rb +0 -1
- data/lib/googleauth/credentials_loader.rb +0 -14
- data/lib/googleauth/default_credentials.rb +0 -2
- data/lib/googleauth/version.rb +1 -1
- data/lib/googleauth/web_user_authorizer.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37795e56189392a97d5941b4982730ffa2ee1dd53ec63593bbb7f5ad50be044e
|
4
|
+
data.tar.gz: 72d6b584c89c321698485bda1e4aef33f361ed35da4762bd22b5dc4634556f8f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1dcfc8f1e8e65f9b4b27c4933e71faffd2998d11766307cf464d0551d5f37e41c266e840a340a9aba41d49f44d05005006077526851b1b33e277ce3155d16370
|
7
|
+
data.tar.gz: f036b3403998c93f41eae33c472ad714758e6c6d06e9a1b197b53d118d182c2abb9caf40636ff63c152e2186642430de824e7929dcd2978cd358a5bd03194c1c
|
data/CHANGELOG.md
CHANGED
@@ -20,9 +20,9 @@ module Google
|
|
20
20
|
# used to access Google APIs.
|
21
21
|
module Auth
|
22
22
|
NOT_FOUND_ERROR = <<~ERROR_MESSAGE.freeze
|
23
|
-
|
24
|
-
|
25
|
-
|
23
|
+
Your credentials were not found. To set up Application Default
|
24
|
+
Credentials for your environment, see
|
25
|
+
https://cloud.google.com/docs/authentication/external/set-up-adc
|
26
26
|
ERROR_MESSAGE
|
27
27
|
|
28
28
|
module_function
|
data/lib/googleauth/client_id.rb
CHANGED
@@ -362,7 +362,6 @@ module Google
|
|
362
362
|
else
|
363
363
|
update_from_filepath keyfile, options
|
364
364
|
end
|
365
|
-
CredentialsLoader.warn_if_cloud_sdk_credentials @client.client_id
|
366
365
|
@project_id ||= CredentialsLoader.load_gcloud_project_id
|
367
366
|
@client.fetch_access_token! if @client.needs_access_token?
|
368
367
|
@env_vars = nil
|
@@ -49,14 +49,6 @@ module Google
|
|
49
49
|
CLOUD_SDK_CLIENT_ID = "764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.app" \
|
50
50
|
"s.googleusercontent.com".freeze
|
51
51
|
|
52
|
-
CLOUD_SDK_CREDENTIALS_WARNING =
|
53
|
-
"You are authenticating using user credentials." \
|
54
|
-
"For production, we recommend using service account credentials." \
|
55
|
-
"To learn more about service account credentials, see" \
|
56
|
-
"http://cloud.google.com/docs/authentication/external/set-up-adc-on-cloud " \
|
57
|
-
"To suppress this message, set the " \
|
58
|
-
"GOOGLE_AUTH_SUPPRESS_CREDENTIALS_WARNINGS environment variable.".freeze
|
59
|
-
|
60
52
|
# make_creds proxies the construction of a credentials instance
|
61
53
|
#
|
62
54
|
# By default, it calls #new on the current class, but this behaviour can
|
@@ -150,12 +142,6 @@ module Google
|
|
150
142
|
|
151
143
|
module_function
|
152
144
|
|
153
|
-
# Issues warning if cloud sdk client id is used
|
154
|
-
def warn_if_cloud_sdk_credentials client_id
|
155
|
-
return if ENV["GOOGLE_AUTH_SUPPRESS_CREDENTIALS_WARNINGS"]
|
156
|
-
warn CLOUD_SDK_CREDENTIALS_WARNING if client_id == CLOUD_SDK_CLIENT_ID
|
157
|
-
end
|
158
|
-
|
159
145
|
# Finds project_id from gcloud CLI configuration
|
160
146
|
def load_gcloud_project_id
|
161
147
|
gcloud = GCLOUD_WINDOWS_COMMAND if OS.windows?
|
@@ -35,11 +35,9 @@ module Google
|
|
35
35
|
json_key_io = options[:json_key_io]
|
36
36
|
if json_key_io
|
37
37
|
json_key, clz = determine_creds_class json_key_io
|
38
|
-
warn_if_cloud_sdk_credentials json_key["client_id"]
|
39
38
|
io = StringIO.new MultiJson.dump(json_key)
|
40
39
|
clz.make_creds options.merge(json_key_io: io)
|
41
40
|
else
|
42
|
-
warn_if_cloud_sdk_credentials ENV[CredentialsLoader::CLIENT_ID_VAR]
|
43
41
|
clz = read_creds
|
44
42
|
clz.make_creds options
|
45
43
|
end
|
data/lib/googleauth/version.rb
CHANGED
@@ -192,13 +192,13 @@ module Google
|
|
192
192
|
end
|
193
193
|
|
194
194
|
def self.extract_callback_state request
|
195
|
-
state = MultiJson.load(request[STATE_PARAM] || "{}")
|
195
|
+
state = MultiJson.load(request.params[STATE_PARAM] || "{}")
|
196
196
|
redirect_uri = state[CURRENT_URI_KEY]
|
197
197
|
callback_state = {
|
198
|
-
AUTH_CODE_KEY => request[AUTH_CODE_KEY],
|
199
|
-
ERROR_CODE_KEY => request[ERROR_CODE_KEY],
|
198
|
+
AUTH_CODE_KEY => request.params[AUTH_CODE_KEY],
|
199
|
+
ERROR_CODE_KEY => request.params[ERROR_CODE_KEY],
|
200
200
|
SESSION_ID_KEY => state[SESSION_ID_KEY],
|
201
|
-
SCOPE_KEY => request[SCOPE_KEY]
|
201
|
+
SCOPE_KEY => request.params[SCOPE_KEY]
|
202
202
|
}
|
203
203
|
[callback_state, redirect_uri]
|
204
204
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: googleauth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Emiola
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-09-
|
11
|
+
date: 2023-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|