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
metadata CHANGED
@@ -1,155 +1,131 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: googleauth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.16.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Emiola
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-25 00:00:00.000000000 Z
11
+ date: 2021-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '0.9'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
17
+ - - ">="
25
18
  - !ruby/object:Gem::Version
26
- version: '0.9'
27
- - !ruby/object:Gem::Dependency
28
- name: logging
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
19
+ version: 0.17.3
20
+ - - "<"
32
21
  - !ruby/object:Gem::Version
33
- version: '1.8'
22
+ version: '2.0'
34
23
  type: :runtime
35
24
  prerelease: false
36
25
  version_requirements: !ruby/object:Gem::Requirement
37
26
  requirements:
38
- - - "~>"
27
+ - - ">="
39
28
  - !ruby/object:Gem::Version
40
- version: '1.8'
29
+ version: 0.17.3
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '2.0'
41
33
  - !ruby/object:Gem::Dependency
42
34
  name: jwt
43
35
  requirement: !ruby/object:Gem::Requirement
44
36
  requirements:
45
- - - "~>"
37
+ - - ">="
46
38
  - !ruby/object:Gem::Version
47
- version: 1.2.1
39
+ version: '1.4'
40
+ - - "<"
41
+ - !ruby/object:Gem::Version
42
+ version: '3.0'
48
43
  type: :runtime
49
44
  prerelease: false
50
45
  version_requirements: !ruby/object:Gem::Requirement
51
46
  requirements:
52
- - - "~>"
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: '1.4'
50
+ - - "<"
53
51
  - !ruby/object:Gem::Version
54
- version: 1.2.1
52
+ version: '3.0'
55
53
  - !ruby/object:Gem::Dependency
56
54
  name: memoist
57
55
  requirement: !ruby/object:Gem::Requirement
58
56
  requirements:
59
57
  - - "~>"
60
58
  - !ruby/object:Gem::Version
61
- version: 0.11.0
59
+ version: '0.16'
62
60
  type: :runtime
63
61
  prerelease: false
64
62
  version_requirements: !ruby/object:Gem::Requirement
65
63
  requirements:
66
64
  - - "~>"
67
65
  - !ruby/object:Gem::Version
68
- version: 0.11.0
66
+ version: '0.16'
69
67
  - !ruby/object:Gem::Dependency
70
68
  name: multi_json
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - '='
74
- - !ruby/object:Gem::Version
75
- version: 1.10.1
76
- type: :runtime
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - '='
81
- - !ruby/object:Gem::Version
82
- version: 1.10.1
83
- - !ruby/object:Gem::Dependency
84
- name: signet
85
69
  requirement: !ruby/object:Gem::Requirement
86
70
  requirements:
87
71
  - - "~>"
88
72
  - !ruby/object:Gem::Version
89
- version: 0.6.0
73
+ version: '1.11'
90
74
  type: :runtime
91
75
  prerelease: false
92
76
  version_requirements: !ruby/object:Gem::Requirement
93
77
  requirements:
94
78
  - - "~>"
95
79
  - !ruby/object:Gem::Version
96
- version: 0.6.0
80
+ version: '1.11'
97
81
  - !ruby/object:Gem::Dependency
98
- name: bundler
82
+ name: os
99
83
  requirement: !ruby/object:Gem::Requirement
100
84
  requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: '1.7'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
85
+ - - ">="
109
86
  - !ruby/object:Gem::Version
110
- version: '1.7'
111
- - !ruby/object:Gem::Dependency
112
- name: rake
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - "~>"
87
+ version: '0.9'
88
+ - - "<"
116
89
  - !ruby/object:Gem::Version
117
- version: '10.0'
118
- type: :development
90
+ version: '2.0'
91
+ type: :runtime
119
92
  prerelease: false
120
93
  version_requirements: !ruby/object:Gem::Requirement
121
94
  requirements:
122
- - - "~>"
95
+ - - ">="
123
96
  - !ruby/object:Gem::Version
124
- version: '10.0'
97
+ version: '0.9'
98
+ - - "<"
99
+ - !ruby/object:Gem::Version
100
+ version: '2.0'
125
101
  - !ruby/object:Gem::Dependency
126
- name: rubocop
102
+ name: signet
127
103
  requirement: !ruby/object:Gem::Requirement
128
104
  requirements:
129
105
  - - "~>"
130
106
  - !ruby/object:Gem::Version
131
- version: 0.28.0
132
- type: :development
107
+ version: '0.14'
108
+ type: :runtime
133
109
  prerelease: false
134
110
  version_requirements: !ruby/object:Gem::Requirement
135
111
  requirements:
136
112
  - - "~>"
137
113
  - !ruby/object:Gem::Version
138
- version: 0.28.0
114
+ version: '0.14'
139
115
  - !ruby/object:Gem::Dependency
140
- name: rspec
116
+ name: yard
141
117
  requirement: !ruby/object:Gem::Requirement
142
118
  requirements:
143
119
  - - "~>"
144
120
  - !ruby/object:Gem::Version
145
- version: '3.0'
121
+ version: '0.9'
146
122
  type: :development
147
123
  prerelease: false
148
124
  version_requirements: !ruby/object:Gem::Requirement
149
125
  requirements:
150
126
  - - "~>"
151
127
  - !ruby/object:Gem::Version
152
- version: '3.0'
128
+ version: '0.9'
153
129
  description: |2
154
130
  Allows simple authorization for accessing Google APIs.
155
131
  Provide support for Application Default Credentials, as described at
@@ -159,27 +135,81 @@ executables: []
159
135
  extensions: []
160
136
  extra_rdoc_files: []
161
137
  files:
138
+ - ".github/CODEOWNERS"
139
+ - ".github/CONTRIBUTING.md"
140
+ - ".github/ISSUE_TEMPLATE/bug_report.md"
141
+ - ".github/ISSUE_TEMPLATE/feature_request.md"
142
+ - ".github/ISSUE_TEMPLATE/support_request.md"
143
+ - ".github/renovate.json"
144
+ - ".github/sync-repo-settings.yaml"
145
+ - ".github/workflows/ci.yml"
146
+ - ".github/workflows/release-please.yml"
162
147
  - ".gitignore"
148
+ - ".kokoro/populate-secrets.sh"
149
+ - ".kokoro/release.cfg"
150
+ - ".kokoro/release.sh"
151
+ - ".kokoro/trampoline_v2.sh"
152
+ - ".repo-metadata.json"
163
153
  - ".rspec"
164
- - ".travis.yml"
165
- - CONTRIBUTING.md
166
- - COPYING
154
+ - ".rubocop.yml"
155
+ - ".toys/.toys.rb"
156
+ - ".toys/ci.rb"
157
+ - ".toys/kokoro/.toys.rb"
158
+ - ".toys/kokoro/publish-docs.rb"
159
+ - ".toys/kokoro/publish-gem.rb"
160
+ - ".toys/linkinator.rb"
161
+ - ".trampolinerc"
162
+ - CHANGELOG.md
163
+ - CODE_OF_CONDUCT.md
167
164
  - Gemfile
165
+ - LICENSE
168
166
  - README.md
169
- - Rakefile
170
167
  - googleauth.gemspec
168
+ - integration/helper.rb
169
+ - integration/id_tokens/key_source_test.rb
171
170
  - lib/googleauth.rb
171
+ - lib/googleauth/application_default.rb
172
+ - lib/googleauth/client_id.rb
172
173
  - lib/googleauth/compute_engine.rb
174
+ - lib/googleauth/credentials.rb
175
+ - lib/googleauth/credentials_loader.rb
176
+ - lib/googleauth/default_credentials.rb
177
+ - lib/googleauth/iam.rb
178
+ - lib/googleauth/id_tokens.rb
179
+ - lib/googleauth/id_tokens/errors.rb
180
+ - lib/googleauth/id_tokens/key_sources.rb
181
+ - lib/googleauth/id_tokens/verifier.rb
182
+ - lib/googleauth/json_key_reader.rb
183
+ - lib/googleauth/scope_util.rb
173
184
  - lib/googleauth/service_account.rb
174
185
  - lib/googleauth/signet.rb
186
+ - lib/googleauth/stores/file_token_store.rb
187
+ - lib/googleauth/stores/redis_token_store.rb
188
+ - lib/googleauth/token_store.rb
189
+ - lib/googleauth/user_authorizer.rb
190
+ - lib/googleauth/user_refresh.rb
175
191
  - lib/googleauth/version.rb
192
+ - lib/googleauth/web_user_authorizer.rb
176
193
  - spec/googleauth/apply_auth_examples.rb
194
+ - spec/googleauth/client_id_spec.rb
177
195
  - spec/googleauth/compute_engine_spec.rb
196
+ - spec/googleauth/credentials_spec.rb
178
197
  - spec/googleauth/get_application_default_spec.rb
198
+ - spec/googleauth/iam_spec.rb
199
+ - spec/googleauth/scope_util_spec.rb
179
200
  - spec/googleauth/service_account_spec.rb
180
201
  - spec/googleauth/signet_spec.rb
202
+ - spec/googleauth/stores/file_token_store_spec.rb
203
+ - spec/googleauth/stores/redis_token_store_spec.rb
204
+ - spec/googleauth/stores/store_examples.rb
205
+ - spec/googleauth/user_authorizer_spec.rb
206
+ - spec/googleauth/user_refresh_spec.rb
207
+ - spec/googleauth/web_user_authorizer_spec.rb
181
208
  - spec/spec_helper.rb
182
- homepage: https://github.com/google/google-auth-library-ruby
209
+ - test/helper.rb
210
+ - test/id_tokens/key_sources_test.rb
211
+ - test/id_tokens/verifier_test.rb
212
+ homepage: https://github.com/googleapis/google-auth-library-ruby
183
213
  licenses:
184
214
  - Apache-2.0
185
215
  metadata: {}
@@ -191,22 +221,31 @@ required_ruby_version: !ruby/object:Gem::Requirement
191
221
  requirements:
192
222
  - - ">="
193
223
  - !ruby/object:Gem::Version
194
- version: '0'
224
+ version: '2.5'
195
225
  required_rubygems_version: !ruby/object:Gem::Requirement
196
226
  requirements:
197
227
  - - ">="
198
228
  - !ruby/object:Gem::Version
199
229
  version: '0'
200
230
  requirements: []
201
- rubyforge_project:
202
- rubygems_version: 2.4.3
231
+ rubygems_version: 3.2.16
203
232
  signing_key:
204
233
  specification_version: 4
205
234
  summary: Google Auth Library for Ruby
206
235
  test_files:
207
236
  - spec/googleauth/apply_auth_examples.rb
237
+ - spec/googleauth/client_id_spec.rb
208
238
  - spec/googleauth/compute_engine_spec.rb
239
+ - spec/googleauth/credentials_spec.rb
209
240
  - spec/googleauth/get_application_default_spec.rb
241
+ - spec/googleauth/iam_spec.rb
242
+ - spec/googleauth/scope_util_spec.rb
210
243
  - spec/googleauth/service_account_spec.rb
211
244
  - spec/googleauth/signet_spec.rb
245
+ - spec/googleauth/stores/file_token_store_spec.rb
246
+ - spec/googleauth/stores/redis_token_store_spec.rb
247
+ - spec/googleauth/stores/store_examples.rb
248
+ - spec/googleauth/user_authorizer_spec.rb
249
+ - spec/googleauth/user_refresh_spec.rb
250
+ - spec/googleauth/web_user_authorizer_spec.rb
212
251
  - spec/spec_helper.rb
data/.travis.yml DELETED
@@ -1,18 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.2
4
- - 2.0.0
5
- - 2.1
6
- - 1.9.3
7
- - rbx-2
8
- - jruby
9
- script: "bundle exec rake spec:all"
10
- before_install:
11
- - sudo apt-get update
12
- - sudo apt-get install idn
13
- notifications:
14
- email:
15
- recipients:
16
- - temiola@google.com
17
- on_success: change
18
- on_failure: change
data/CONTRIBUTING.md DELETED
@@ -1,32 +0,0 @@
1
- # How to become a contributor and submit your own code
2
-
3
- ## Contributor License Agreements
4
-
5
- We'd love to accept your sample apps and patches! Before we can take them, we
6
- have to jump a couple of legal hurdles.
7
-
8
- Please fill out either the individual or corporate Contributor License Agreement
9
- (CLA).
10
-
11
- * If you are an individual writing original source code and you're sure you
12
- own the intellectual property, then you'll need to sign an [individual CLA]
13
- (http://code.google.com/legal/individual-cla-v1.0.html).
14
- * If you work for a company that wants to allow you to contribute your work,
15
- then you'll need to sign a [corporate CLA]
16
- (http://code.google.com/legal/corporate-cla-v1.0.html).
17
-
18
- Follow either of the two links above to access the appropriate CLA and
19
- instructions for how to sign and return it. Once we receive it, we'll be able to
20
- accept your pull requests.
21
-
22
- ## Contributing A Patch
23
-
24
- 1. Submit an issue describing your proposed change to the repo in question.
25
- 1. The repo owner will respond to your issue promptly.
26
- 1. If your proposed change is accepted, and you haven't already done so, sign a
27
- Contributor License Agreement (see details above).
28
- 1. Fork the desired repo, develop and test your code changes.
29
- 1. Ensure that your code is clear and comprehensible.
30
- 1. Ensure that your code has an appropriate set of unit tests which all pass.
31
- 1. Submit a pull request.
32
-
data/Rakefile DELETED
@@ -1,15 +0,0 @@
1
- # -*- ruby -*-
2
- require 'rspec/core/rake_task'
3
- require 'rubocop/rake_task'
4
- require 'bundler/gem_tasks'
5
-
6
- desc 'Run Rubocop to check for style violations'
7
- RuboCop::RakeTask.new
8
-
9
- desc 'Run rake task'
10
- RSpec::Core::RakeTask.new(:spec)
11
-
12
- desc 'Does rubocop lint and runs the specs'
13
- task all: [:rubocop, :spec]
14
-
15
- task default: :all