googleauth 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +59 -67
- data/README.md +16 -5
- data/lib/googleauth/credentials_loader.rb +0 -2
- data/lib/googleauth/version.rb +1 -1
- 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: 967a6321e1ec2dafec23915f77028196ca588d1b0cd7d40c0824d918d4001298
|
4
|
+
data.tar.gz: b85411d05c86ccc52727047c74d82dc30e16df41f374ac6f64d760776be923fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d858caa697993c8c8336e2b15a5a8e1bf21d939678513874426207e7002a052d82f0ed2020ed7cef54ec14e97aca0e2ce23ff8442cd346d72ea45d4975d4373d
|
7
|
+
data.tar.gz: fda398a2576f28e0dff7196e46ce0d51e4e73b4db4f4f59d10e3e2fd124913cc0af2533428bd0a8a8b83f7b6b334757540b556b1160c9adf8dbc6dd9dab827c6
|
data/CHANGELOG.md
CHANGED
@@ -1,90 +1,92 @@
|
|
1
1
|
# Release History
|
2
2
|
|
3
|
-
###
|
3
|
+
### 1.1.3 (2022-04-20)
|
4
4
|
|
5
|
+
#### Documentation
|
5
6
|
|
6
|
-
|
7
|
+
* Add README instructions for 3-Legged OAuth with a service account
|
7
8
|
|
8
|
-
|
9
|
+
### 1.1.2 (2022-02-22)
|
9
10
|
|
10
|
-
|
11
|
+
#### Bug Fixes
|
11
12
|
|
13
|
+
* Support Faraday 2
|
12
14
|
|
13
|
-
###
|
15
|
+
### 1.1.1 (2022-02-14)
|
14
16
|
|
15
|
-
|
17
|
+
#### Bug Fixes
|
16
18
|
|
17
|
-
|
19
|
+
* add quota_project to user refresh credentials
|
18
20
|
|
21
|
+
### 1.1.0 (2021-10-24)
|
19
22
|
|
20
|
-
|
23
|
+
#### Features
|
21
24
|
|
22
|
-
* Support short-lived tokens in Credentials
|
25
|
+
* Support short-lived tokens in Credentials
|
23
26
|
|
24
|
-
|
27
|
+
### 1.0.0 (2021-09-27)
|
25
28
|
|
26
29
|
Bumped version to 1.0.0. Releases from this point will follow semver.
|
27
30
|
|
28
|
-
* Allow dependency on future 1.x versions of signet
|
29
|
-
* Prevented gcloud from authenticating on the console when getting the gcloud project
|
31
|
+
* Allow dependency on future 1.x versions of signet
|
32
|
+
* Prevented gcloud from authenticating on the console when getting the gcloud project
|
30
33
|
|
31
|
-
|
34
|
+
### 0.17.1 (2021-09-01)
|
32
35
|
|
33
|
-
* Updates to gem metadata
|
36
|
+
* Updates to gem metadata
|
34
37
|
|
35
|
-
|
38
|
+
### 0.17.0 (2021-07-30)
|
36
39
|
|
37
|
-
* Allow scopes to be self-signed into jwts
|
40
|
+
* Allow scopes to be self-signed into jwts
|
38
41
|
|
39
|
-
|
42
|
+
### 0.16.2 (2021-04-28)
|
40
43
|
|
41
|
-
* Stop attempting to get the project from gcloud when applying self-signed JWTs
|
44
|
+
* Stop attempting to get the project from gcloud when applying self-signed JWTs
|
42
45
|
|
43
|
-
|
46
|
+
### 0.16.1 (2021-04-01)
|
44
47
|
|
45
|
-
* Accept application/text content-type for plain idtoken response
|
48
|
+
* Accept application/text content-type for plain idtoken response
|
46
49
|
|
47
|
-
|
50
|
+
### 0.16.0 (2021-03-04)
|
48
51
|
|
49
|
-
* Drop support for Ruby 2.4 and add support for Ruby 3.0
|
52
|
+
* Drop support for Ruby 2.4 and add support for Ruby 3.0
|
50
53
|
|
51
|
-
|
54
|
+
### 0.15.1 (2021-02-08)
|
52
55
|
|
53
|
-
* Fix crash when using a client credential without any paths or env_vars set
|
56
|
+
* Fix crash when using a client credential without any paths or env_vars set
|
54
57
|
|
55
|
-
|
58
|
+
### 0.15.0 (2021-01-26)
|
56
59
|
|
57
|
-
* Credential parameters inherit from superclasses
|
58
|
-
* Service accounts apply a self-signed JWT if scopes are marked as default
|
60
|
+
* Credential parameters inherit from superclasses
|
61
|
+
* Service accounts apply a self-signed JWT if scopes are marked as default
|
62
|
+
* Retry fetch_access_token when GCE metadata server returns unexpected errors
|
63
|
+
* Support correct service account and user refresh behavior for custom credential env variables
|
59
64
|
|
60
|
-
|
61
|
-
* 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))
|
62
|
-
|
63
|
-
## 0.14.0 / 2020-10-09
|
65
|
+
### 0.14.0 / 2020-10-09
|
64
66
|
|
65
67
|
* Honor GCE_METADATA_HOST environment variable
|
66
68
|
* Fix errors in some environments when requesting an access token for multiple scopes
|
67
69
|
|
68
|
-
|
70
|
+
### 0.13.1 / 2020-07-30
|
69
71
|
|
70
72
|
* Support scopes when using GCE Metadata Server authentication ([@ball-hayden][])
|
71
73
|
|
72
|
-
|
74
|
+
### 0.13.0 / 2020-06-17
|
73
75
|
|
74
76
|
* Support for validating ID tokens.
|
75
77
|
* Fixed header application of ID tokens from service accounts.
|
76
78
|
|
77
|
-
|
79
|
+
### 0.12.0 / 2020-04-08
|
78
80
|
|
79
81
|
* Support for ID token credentials.
|
80
82
|
* Support reading quota_id_project from service account credentials.
|
81
83
|
|
82
|
-
|
84
|
+
### 0.11.0 / 2020-02-24
|
83
85
|
|
84
86
|
* Support Faraday 1.x.
|
85
87
|
* Allow special "postmessage" value for redirect_uri.
|
86
88
|
|
87
|
-
|
89
|
+
### 0.10.0 / 2019-10-09
|
88
90
|
|
89
91
|
Note: This release now requires Ruby 2.4 or later
|
90
92
|
|
@@ -94,7 +96,7 @@ Note: This release now requires Ruby 2.4 or later
|
|
94
96
|
* Set instance variables at initialization to avoid spamming warnings
|
95
97
|
* Pass "Metadata-Flavor" header to metadata server when checking for GCE
|
96
98
|
|
97
|
-
|
99
|
+
### 0.9.0 / 2019-08-05
|
98
100
|
|
99
101
|
* 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.
|
100
102
|
* Update Credentials to use methods for values that are intended to be changed by users, replacing constants.
|
@@ -103,105 +105,95 @@ Note: This release now requires Ruby 2.4 or later
|
|
103
105
|
* Add verbosity none to gcloud command
|
104
106
|
* Make arity of WebUserAuthorizer#get_credentials compatible with the base class
|
105
107
|
|
106
|
-
|
108
|
+
### 0.8.1 / 2019-03-27
|
107
109
|
|
108
110
|
* Silence unnecessary gcloud warning
|
109
111
|
* Treat empty credentials environment variables as unset
|
110
112
|
|
111
|
-
|
113
|
+
### 0.8.0 / 2019-01-02
|
112
114
|
|
113
115
|
* 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.
|
114
116
|
* Removed an unnecessary warning about project IDs.
|
115
117
|
|
116
|
-
|
118
|
+
### 0.7.1 / 2018-10-25
|
117
119
|
|
118
120
|
* Make load_gcloud_project_id module function.
|
119
121
|
|
120
|
-
|
122
|
+
### 0.7.0 / 2018-10-24
|
121
123
|
|
122
124
|
* Add project_id instance variable to UserRefreshCredentials, ServiceAccountCredentials, and Credentials.
|
123
125
|
|
124
|
-
|
126
|
+
### 0.6.7 / 2018-10-16
|
125
127
|
|
126
128
|
* Update memoist dependency to ~> 0.16.
|
127
129
|
|
128
|
-
|
130
|
+
### 0.6.6 / 2018-08-22
|
129
131
|
|
130
132
|
* Remove ruby version warnings.
|
131
133
|
|
132
|
-
|
134
|
+
### 0.6.5 / 2018-08-16
|
133
135
|
|
134
136
|
* Fix incorrect http verb when revoking credentials.
|
135
137
|
* Warn on EOL ruby versions.
|
136
138
|
|
137
|
-
|
139
|
+
### 0.6.4 / 2018-08-03
|
138
140
|
|
139
141
|
* Resolve issue where DefaultCredentials constant was undefined.
|
140
142
|
|
141
|
-
|
143
|
+
### 0.6.3 / 2018-08-02
|
142
144
|
|
143
145
|
* Resolve issue where token_store was being written to twice
|
144
146
|
|
145
|
-
|
147
|
+
### 0.6.2 / 2018-08-01
|
146
148
|
|
147
149
|
* Add warning when using cloud sdk credentials
|
148
150
|
|
149
|
-
|
151
|
+
### 0.6.1 / 2017-10-18
|
150
152
|
|
151
153
|
* Fix file permissions
|
152
154
|
|
153
|
-
|
155
|
+
### 0.6.0 / 2017-10-17
|
154
156
|
|
155
157
|
* Support ruby-jwt 2.0
|
156
158
|
* Add simple credentials class
|
157
159
|
|
158
|
-
|
160
|
+
### 0.5.3 / 2017-07-21
|
159
161
|
|
160
162
|
* Fix file permissions on the gem's `.rb` files.
|
161
163
|
|
162
|
-
|
164
|
+
### 0.5.2 / 2017-07-19
|
163
165
|
|
164
166
|
* Add retry mechanism when fetching access tokens in `GCECredentials` and `UserRefreshCredentials` classes.
|
165
167
|
* Update Google API OAuth2 token credential URI to v4.
|
166
168
|
|
167
|
-
|
169
|
+
### 0.5.1 / 2016-01-06
|
168
170
|
|
169
171
|
* Change header name emitted by `Client#apply` from "Authorization" to "authorization" ([@murgatroid99][])
|
170
172
|
* Fix ADC not working on some windows machines ([@vsubramani][])
|
171
|
-
[#55](https://github.com/google/google-auth-library-ruby/issues/55)
|
172
173
|
|
173
|
-
|
174
|
+
### 0.5.0 / 2015-10-12
|
174
175
|
|
175
176
|
* Initial support for user credentials ([@sqrrrl][])
|
176
177
|
* Update Signet to 0.7
|
177
178
|
|
178
|
-
|
179
|
+
### 0.4.2 / 2015-08-05
|
179
180
|
|
180
181
|
* Updated UserRefreshCredentials hash to use string keys ([@haabaato][])
|
181
|
-
[#36](https://github.com/google/google-auth-library-ruby/issues/36)
|
182
|
-
|
183
182
|
* Add support for a system default credentials file. ([@mr-salty][])
|
184
|
-
[#33](https://github.com/google/google-auth-library-ruby/issues/33)
|
185
|
-
|
186
183
|
* Fix bug when loading credentials from ENV ([@dwilkie][])
|
187
|
-
[#31](https://github.com/google/google-auth-library-ruby/issues/31)
|
188
|
-
|
189
184
|
* Relax the constraint of dependent version of multi_json ([@igrep][])
|
190
|
-
[#30](https://github.com/google/google-auth-library-ruby/issues/30)
|
191
|
-
|
192
185
|
* Enables passing credentials via environment variables. ([@haabaato][])
|
193
|
-
[#27](https://github.com/google/google-auth-library-ruby/issues/27)
|
194
186
|
|
195
|
-
|
187
|
+
### 0.4.1 / 2015-04-25
|
196
188
|
|
197
189
|
* Improves handling of --no-scopes GCE authorization ([@tbetbetbe][])
|
198
190
|
* Refactoring and cleanup ([@joneslee85][])
|
199
191
|
|
200
|
-
|
192
|
+
### 0.4.0 / 2015-03-25
|
201
193
|
|
202
194
|
* Adds an implementation of JWT header auth ([@tbetbetbe][])
|
203
195
|
|
204
|
-
|
196
|
+
### 0.3.0 / 2015-03-23
|
205
197
|
|
206
198
|
* makes the scope parameter's optional in all APIs. ([@tbetbetbe][])
|
207
199
|
* changes the scope parameter's position in various constructors. ([@tbetbetbe][])
|
data/README.md
CHANGED
@@ -14,11 +14,6 @@
|
|
14
14
|
This is Google's officially supported ruby client library for using OAuth 2.0
|
15
15
|
authorization and authentication with Google APIs.
|
16
16
|
|
17
|
-
## Alpha
|
18
|
-
|
19
|
-
This library is in Alpha. We will make an effort to support the library, but
|
20
|
-
we reserve the right to make incompatible changes when necessary.
|
21
|
-
|
22
17
|
## Install
|
23
18
|
|
24
19
|
Be sure `https://rubygems.org/` is in your gem sources.
|
@@ -162,6 +157,22 @@ drive.authorization = authorizer
|
|
162
157
|
list_files = drive.list_files()
|
163
158
|
```
|
164
159
|
|
160
|
+
### 3-Legged OAuth with a Service Account
|
161
|
+
|
162
|
+
This is similar to regular service account authorization (see [this answer](https://support.google.com/a/answer/2538798?hl=en) for more details on the differences), but you'll need to indicate which user your service account is impersonating by manually updating the `sub` field.
|
163
|
+
|
164
|
+
```ruby
|
165
|
+
scope = 'https://www.googleapis.com/auth/androidpublisher'
|
166
|
+
|
167
|
+
authorizer = Google::Auth::ServiceAccountCredentials.make_creds(
|
168
|
+
json_key_io: File.open('/path/to/service_account_json_key.json'),
|
169
|
+
scope: scope
|
170
|
+
)
|
171
|
+
authorizer.update!(sub: "email-to-impersonate@your-domain.com")
|
172
|
+
|
173
|
+
authorizer.fetch_access_token!
|
174
|
+
```
|
175
|
+
|
165
176
|
### Example (Environment Variables)
|
166
177
|
|
167
178
|
```bash
|
@@ -12,7 +12,6 @@
|
|
12
12
|
# See the License for the specific language governing permissions and
|
13
13
|
# limitations under the License.
|
14
14
|
|
15
|
-
require "memoist"
|
16
15
|
require "os"
|
17
16
|
require "rbconfig"
|
18
17
|
|
@@ -23,7 +22,6 @@ module Google
|
|
23
22
|
# CredentialsLoader contains the behaviour used to locate and find default
|
24
23
|
# credentials files on the file system.
|
25
24
|
module CredentialsLoader
|
26
|
-
extend Memoist
|
27
25
|
ENV_VAR = "GOOGLE_APPLICATION_CREDENTIALS".freeze
|
28
26
|
PRIVATE_KEY_VAR = "GOOGLE_PRIVATE_KEY".freeze
|
29
27
|
CLIENT_EMAIL_VAR = "GOOGLE_CLIENT_EMAIL".freeze
|
data/lib/googleauth/version.rb
CHANGED
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.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Emiola
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|