doorkeeper 4.4.3 → 5.0.3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of doorkeeper might be problematic. Click here for more details.

Files changed (223) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +1 -0
  3. data/.gitlab-ci.yml +16 -0
  4. data/.travis.yml +7 -0
  5. data/Appraisals +2 -2
  6. data/Dangerfile +64 -0
  7. data/Gemfile +1 -1
  8. data/NEWS.md +98 -8
  9. data/README.md +110 -12
  10. data/Rakefile +6 -0
  11. data/UPGRADE.md +2 -0
  12. data/app/assets/stylesheets/doorkeeper/admin/application.css +2 -2
  13. data/app/controllers/doorkeeper/application_controller.rb +6 -3
  14. data/app/controllers/doorkeeper/application_metal_controller.rb +6 -0
  15. data/app/controllers/doorkeeper/applications_controller.rb +46 -24
  16. data/app/controllers/doorkeeper/authorizations_controller.rb +55 -12
  17. data/app/controllers/doorkeeper/authorized_applications_controller.rb +21 -2
  18. data/app/controllers/doorkeeper/token_info_controller.rb +2 -0
  19. data/app/controllers/doorkeeper/tokens_controller.rb +4 -6
  20. data/app/helpers/doorkeeper/dashboard_helper.rb +9 -7
  21. data/app/validators/redirect_uri_validator.rb +5 -2
  22. data/app/views/doorkeeper/applications/_delete_form.html.erb +3 -1
  23. data/app/views/doorkeeper/applications/_form.html.erb +25 -24
  24. data/app/views/doorkeeper/applications/edit.html.erb +1 -1
  25. data/app/views/doorkeeper/applications/index.html.erb +17 -7
  26. data/app/views/doorkeeper/applications/new.html.erb +1 -1
  27. data/app/views/doorkeeper/applications/show.html.erb +6 -6
  28. data/app/views/doorkeeper/authorizations/error.html.erb +1 -1
  29. data/app/views/doorkeeper/authorizations/new.html.erb +4 -0
  30. data/app/views/layouts/doorkeeper/admin.html.erb +15 -15
  31. data/config/locales/en.yml +10 -1
  32. data/doorkeeper.gemspec +25 -26
  33. data/gemfiles/rails_5_2.gemfile +1 -1
  34. data/gemfiles/rails_master.gemfile +4 -1
  35. data/lib/doorkeeper/config.rb +81 -40
  36. data/lib/doorkeeper/engine.rb +6 -0
  37. data/lib/doorkeeper/errors.rb +17 -3
  38. data/lib/doorkeeper/grape/authorization_decorator.rb +2 -0
  39. data/lib/doorkeeper/grape/helpers.rb +3 -1
  40. data/lib/doorkeeper/helpers/controller.rb +9 -2
  41. data/lib/doorkeeper/models/access_grant_mixin.rb +73 -0
  42. data/lib/doorkeeper/models/access_token_mixin.rb +44 -25
  43. data/lib/doorkeeper/models/application_mixin.rb +2 -0
  44. data/lib/doorkeeper/models/concerns/accessible.rb +2 -0
  45. data/lib/doorkeeper/models/concerns/expirable.rb +2 -0
  46. data/lib/doorkeeper/models/concerns/orderable.rb +2 -0
  47. data/lib/doorkeeper/models/concerns/ownership.rb +2 -0
  48. data/lib/doorkeeper/models/concerns/revocable.rb +2 -0
  49. data/lib/doorkeeper/models/concerns/scopes.rb +3 -1
  50. data/lib/doorkeeper/oauth/authorization/code.rb +33 -8
  51. data/lib/doorkeeper/oauth/authorization/context.rb +17 -0
  52. data/lib/doorkeeper/oauth/authorization/token.rb +38 -14
  53. data/lib/doorkeeper/oauth/authorization/uri_builder.rb +2 -0
  54. data/lib/doorkeeper/oauth/authorization_code_request.rb +29 -2
  55. data/lib/doorkeeper/oauth/base_request.rb +22 -9
  56. data/lib/doorkeeper/oauth/base_response.rb +2 -0
  57. data/lib/doorkeeper/oauth/client/credentials.rb +3 -1
  58. data/lib/doorkeeper/oauth/client.rb +1 -1
  59. data/lib/doorkeeper/oauth/client_credentials/creator.rb +4 -1
  60. data/lib/doorkeeper/oauth/client_credentials/issuer.rb +7 -2
  61. data/lib/doorkeeper/oauth/client_credentials/validation.rb +5 -5
  62. data/lib/doorkeeper/oauth/client_credentials_request.rb +1 -3
  63. data/lib/doorkeeper/oauth/code_request.rb +2 -0
  64. data/lib/doorkeeper/oauth/code_response.rb +2 -0
  65. data/lib/doorkeeper/oauth/error.rb +2 -0
  66. data/lib/doorkeeper/oauth/error_response.rb +21 -3
  67. data/lib/doorkeeper/oauth/forbidden_token_response.rb +9 -2
  68. data/lib/doorkeeper/oauth/helpers/scope_checker.rb +2 -8
  69. data/lib/doorkeeper/oauth/helpers/unique_token.rb +2 -0
  70. data/lib/doorkeeper/oauth/helpers/uri_checker.rb +5 -2
  71. data/lib/doorkeeper/oauth/invalid_token_response.rb +18 -0
  72. data/lib/doorkeeper/oauth/password_access_token_request.rb +9 -4
  73. data/lib/doorkeeper/oauth/pre_authorization.rb +43 -11
  74. data/lib/doorkeeper/oauth/refresh_token_request.rb +16 -3
  75. data/lib/doorkeeper/oauth/scopes.rb +3 -1
  76. data/lib/doorkeeper/oauth/token.rb +7 -2
  77. data/lib/doorkeeper/oauth/token_introspection.rb +4 -2
  78. data/lib/doorkeeper/oauth/token_request.rb +2 -0
  79. data/lib/doorkeeper/oauth/token_response.rb +6 -2
  80. data/lib/doorkeeper/oauth.rb +13 -0
  81. data/lib/doorkeeper/orm/active_record/application.rb +75 -12
  82. data/lib/doorkeeper/orm/active_record/stale_records_cleaner.rb +26 -0
  83. data/lib/doorkeeper/orm/active_record.rb +4 -0
  84. data/lib/doorkeeper/rails/helpers.rb +6 -4
  85. data/lib/doorkeeper/rails/routes/mapper.rb +2 -0
  86. data/lib/doorkeeper/rails/routes/mapping.rb +2 -0
  87. data/lib/doorkeeper/rails/routes.rb +23 -8
  88. data/lib/doorkeeper/rake/db.rake +40 -0
  89. data/lib/doorkeeper/rake/setup.rake +6 -0
  90. data/lib/doorkeeper/rake.rb +14 -0
  91. data/lib/doorkeeper/request/authorization_code.rb +1 -1
  92. data/lib/doorkeeper/request/client_credentials.rb +1 -1
  93. data/lib/doorkeeper/request/code.rb +1 -1
  94. data/lib/doorkeeper/request/password.rb +1 -1
  95. data/lib/doorkeeper/request/refresh_token.rb +1 -1
  96. data/lib/doorkeeper/request/strategy.rb +2 -0
  97. data/lib/doorkeeper/request/token.rb +1 -1
  98. data/lib/doorkeeper/request.rb +29 -34
  99. data/lib/doorkeeper/server.rb +2 -0
  100. data/lib/doorkeeper/stale_records_cleaner.rb +20 -0
  101. data/lib/doorkeeper/validations.rb +2 -0
  102. data/lib/doorkeeper/version.rb +6 -24
  103. data/lib/doorkeeper.rb +20 -17
  104. data/lib/generators/doorkeeper/application_owner_generator.rb +23 -18
  105. data/lib/generators/doorkeeper/confidential_applications_generator.rb +32 -0
  106. data/lib/generators/doorkeeper/install_generator.rb +17 -9
  107. data/lib/generators/doorkeeper/migration_generator.rb +23 -18
  108. data/lib/generators/doorkeeper/pkce_generator.rb +32 -0
  109. data/lib/generators/doorkeeper/previous_refresh_token_generator.rb +29 -24
  110. data/lib/generators/doorkeeper/templates/add_confidential_to_applications.rb.erb +13 -0
  111. data/lib/generators/doorkeeper/templates/enable_pkce_migration.rb.erb +6 -0
  112. data/lib/generators/doorkeeper/templates/initializer.rb +96 -13
  113. data/lib/generators/doorkeeper/templates/migration.rb.erb +2 -3
  114. data/lib/generators/doorkeeper/views_generator.rb +3 -1
  115. data/spec/controllers/application_metal_controller_spec.rb +50 -0
  116. data/spec/controllers/applications_controller_spec.rb +123 -14
  117. data/spec/controllers/authorizations_controller_spec.rb +334 -51
  118. data/spec/controllers/protected_resources_controller_spec.rb +60 -18
  119. data/spec/controllers/token_info_controller_spec.rb +4 -12
  120. data/spec/controllers/tokens_controller_spec.rb +17 -20
  121. data/spec/dummy/Rakefile +1 -1
  122. data/spec/dummy/app/assets/config/manifest.js +2 -0
  123. data/spec/dummy/app/controllers/custom_authorizations_controller.rb +1 -1
  124. data/spec/dummy/app/controllers/home_controller.rb +1 -2
  125. data/spec/dummy/config/application.rb +1 -1
  126. data/spec/dummy/config/boot.rb +2 -4
  127. data/spec/dummy/config/environment.rb +1 -1
  128. data/spec/dummy/config/environments/test.rb +5 -6
  129. data/spec/dummy/config/initializers/doorkeeper.rb +12 -6
  130. data/spec/dummy/config/initializers/new_framework_defaults.rb +2 -0
  131. data/spec/dummy/config/initializers/secret_token.rb +1 -1
  132. data/spec/dummy/config/routes.rb +3 -42
  133. data/spec/dummy/config.ru +1 -1
  134. data/spec/dummy/db/migrate/20151223192035_create_doorkeeper_tables.rb +4 -4
  135. data/spec/dummy/db/migrate/20151223200000_add_owner_to_application.rb +1 -1
  136. data/spec/dummy/db/migrate/20170822064514_enable_pkce.rb +6 -0
  137. data/spec/dummy/db/migrate/{20180210183654_add_confidential_to_application.rb → 20180210183654_add_confidential_to_applications.rb} +1 -1
  138. data/spec/dummy/db/schema.rb +36 -36
  139. data/spec/dummy/script/rails +4 -3
  140. data/spec/factories.rb +6 -6
  141. data/spec/generators/application_owner_generator_spec.rb +1 -1
  142. data/spec/generators/confidential_applications_generator_spec.rb +45 -0
  143. data/spec/generators/install_generator_spec.rb +5 -2
  144. data/spec/generators/migration_generator_spec.rb +1 -1
  145. data/spec/generators/pkce_generator_spec.rb +43 -0
  146. data/spec/generators/previous_refresh_token_generator_spec.rb +1 -1
  147. data/spec/generators/templates/routes.rb +0 -1
  148. data/spec/generators/views_generator_spec.rb +2 -2
  149. data/spec/grape/grape_integration_spec.rb +2 -2
  150. data/spec/helpers/doorkeeper/dashboard_helper_spec.rb +1 -1
  151. data/spec/lib/config_spec.rb +105 -39
  152. data/spec/lib/doorkeeper_spec.rb +6 -131
  153. data/spec/lib/models/expirable_spec.rb +0 -3
  154. data/spec/lib/models/revocable_spec.rb +0 -2
  155. data/spec/lib/models/scopes_spec.rb +0 -4
  156. data/spec/lib/oauth/authorization/uri_builder_spec.rb +0 -4
  157. data/spec/lib/oauth/authorization_code_request_spec.rb +17 -7
  158. data/spec/lib/oauth/base_request_spec.rb +49 -11
  159. data/spec/lib/oauth/base_response_spec.rb +1 -1
  160. data/spec/lib/oauth/client/credentials_spec.rb +2 -4
  161. data/spec/lib/oauth/client_credentials/creator_spec.rb +5 -1
  162. data/spec/lib/oauth/client_credentials/issuer_spec.rb +24 -7
  163. data/spec/lib/oauth/client_credentials/validation_spec.rb +4 -4
  164. data/spec/lib/oauth/client_credentials_integration_spec.rb +2 -2
  165. data/spec/lib/oauth/client_credentials_request_spec.rb +3 -5
  166. data/spec/lib/oauth/client_spec.rb +0 -3
  167. data/spec/lib/oauth/code_request_spec.rb +5 -3
  168. data/spec/lib/oauth/code_response_spec.rb +1 -1
  169. data/spec/lib/oauth/error_response_spec.rb +0 -3
  170. data/spec/lib/oauth/error_spec.rb +0 -2
  171. data/spec/lib/oauth/forbidden_token_response_spec.rb +1 -4
  172. data/spec/lib/oauth/helpers/scope_checker_spec.rb +8 -11
  173. data/spec/lib/oauth/helpers/unique_token_spec.rb +0 -1
  174. data/spec/lib/oauth/helpers/uri_checker_spec.rb +22 -13
  175. data/spec/lib/oauth/invalid_token_response_spec.rb +1 -4
  176. data/spec/lib/oauth/password_access_token_request_spec.rb +53 -6
  177. data/spec/lib/oauth/pre_authorization_spec.rb +33 -4
  178. data/spec/lib/oauth/refresh_token_request_spec.rb +22 -14
  179. data/spec/lib/oauth/scopes_spec.rb +0 -3
  180. data/spec/lib/oauth/token_request_spec.rb +8 -9
  181. data/spec/lib/oauth/token_response_spec.rb +0 -1
  182. data/spec/lib/oauth/token_spec.rb +40 -14
  183. data/spec/lib/request/strategy_spec.rb +0 -1
  184. data/spec/lib/server_spec.rb +7 -7
  185. data/spec/lib/stale_records_cleaner_spec.rb +89 -0
  186. data/spec/models/doorkeeper/access_grant_spec.rb +44 -1
  187. data/spec/models/doorkeeper/access_token_spec.rb +80 -32
  188. data/spec/models/doorkeeper/application_spec.rb +293 -221
  189. data/spec/requests/applications/applications_request_spec.rb +134 -1
  190. data/spec/requests/applications/authorized_applications_spec.rb +1 -1
  191. data/spec/requests/endpoints/authorization_spec.rb +3 -3
  192. data/spec/requests/endpoints/token_spec.rb +7 -5
  193. data/spec/requests/flows/authorization_code_errors_spec.rb +2 -2
  194. data/spec/requests/flows/authorization_code_spec.rb +258 -2
  195. data/spec/requests/flows/client_credentials_spec.rb +46 -6
  196. data/spec/requests/flows/implicit_grant_errors_spec.rb +3 -3
  197. data/spec/requests/flows/implicit_grant_spec.rb +38 -11
  198. data/spec/requests/flows/password_spec.rb +61 -3
  199. data/spec/requests/flows/refresh_token_spec.rb +59 -2
  200. data/spec/requests/flows/revoke_token_spec.rb +20 -20
  201. data/spec/requests/flows/skip_authorization_spec.rb +16 -11
  202. data/spec/requests/protected_resources/metal_spec.rb +1 -1
  203. data/spec/requests/protected_resources/private_api_spec.rb +3 -3
  204. data/spec/routing/custom_controller_routes_spec.rb +59 -7
  205. data/spec/routing/default_routes_spec.rb +2 -2
  206. data/spec/routing/scoped_routes_spec.rb +16 -2
  207. data/spec/spec_helper.rb +54 -3
  208. data/spec/spec_helper_integration.rb +2 -74
  209. data/spec/support/dependencies/{factory_girl.rb → factory_bot.rb} +0 -0
  210. data/spec/support/doorkeeper_rspec.rb +20 -0
  211. data/spec/support/helpers/authorization_request_helper.rb +4 -4
  212. data/spec/support/helpers/model_helper.rb +8 -4
  213. data/spec/support/helpers/request_spec_helper.rb +10 -2
  214. data/spec/support/helpers/url_helper.rb +18 -14
  215. data/spec/support/http_method_shim.rb +12 -16
  216. data/spec/support/shared/controllers_shared_context.rb +56 -0
  217. data/spec/validators/redirect_uri_validator_spec.rb +9 -3
  218. data/spec/version/version_spec.rb +3 -3
  219. data/vendor/assets/stylesheets/doorkeeper/bootstrap.min.css +4 -5
  220. metadata +54 -35
  221. data/lib/generators/doorkeeper/add_client_confidentiality_generator.rb +0 -31
  222. data/lib/generators/doorkeeper/templates/add_confidential_to_application_migration.rb.erb +0 -11
  223. data/spec/controllers/application_metal_controller.rb +0 -10
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doorkeeper
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.4.3
4
+ version: 5.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felipe Elias Philipp
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2018-09-19 00:00:00.000000000 Z
14
+ date: 2020-05-05 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: railties
@@ -31,16 +31,16 @@ dependencies:
31
31
  name: capybara
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  requirements:
34
- - - ">="
34
+ - - "~>"
35
35
  - !ruby/object:Gem::Version
36
- version: '0'
36
+ version: '2.18'
37
37
  type: :development
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
- - - ">="
41
+ - - "~>"
42
42
  - !ruby/object:Gem::Version
43
- version: '0'
43
+ version: '2.18'
44
44
  - !ruby/object:Gem::Dependency
45
45
  name: coveralls
46
46
  requirement: !ruby/object:Gem::Requirement
@@ -55,6 +55,20 @@ dependencies:
55
55
  - - ">="
56
56
  - !ruby/object:Gem::Version
57
57
  version: '0'
58
+ - !ruby/object:Gem::Dependency
59
+ name: danger
60
+ requirement: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - "~>"
63
+ - !ruby/object:Gem::Version
64
+ version: '5.0'
65
+ type: :development
66
+ prerelease: false
67
+ version_requirements: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - "~>"
70
+ - !ruby/object:Gem::Version
71
+ version: '5.0'
58
72
  - !ruby/object:Gem::Dependency
59
73
  name: grape
60
74
  requirement: !ruby/object:Gem::Requirement
@@ -150,6 +164,7 @@ files:
150
164
  - ".github/ISSUE_TEMPLATE.md"
151
165
  - ".github/PULL_REQUEST_TEMPLATE.md"
152
166
  - ".gitignore"
167
+ - ".gitlab-ci.yml"
153
168
  - ".hound.yml"
154
169
  - ".rspec"
155
170
  - ".rubocop.yml"
@@ -157,6 +172,7 @@ files:
157
172
  - Appraisals
158
173
  - CODE_OF_CONDUCT.md
159
174
  - CONTRIBUTING.md
175
+ - Dangerfile
160
176
  - Gemfile
161
177
  - MIT-LICENSE
162
178
  - NEWS.md
@@ -164,6 +180,7 @@ files:
164
180
  - RELEASING.md
165
181
  - Rakefile
166
182
  - SECURITY.md
183
+ - UPGRADE.md
167
184
  - app/assets/stylesheets/doorkeeper/admin/application.css
168
185
  - app/assets/stylesheets/doorkeeper/application.css
169
186
  - app/controllers/doorkeeper/application_controller.rb
@@ -211,7 +228,9 @@ files:
211
228
  - lib/doorkeeper/models/concerns/ownership.rb
212
229
  - lib/doorkeeper/models/concerns/revocable.rb
213
230
  - lib/doorkeeper/models/concerns/scopes.rb
231
+ - lib/doorkeeper/oauth.rb
214
232
  - lib/doorkeeper/oauth/authorization/code.rb
233
+ - lib/doorkeeper/oauth/authorization/context.rb
215
234
  - lib/doorkeeper/oauth/authorization/token.rb
216
235
  - lib/doorkeeper/oauth/authorization/uri_builder.rb
217
236
  - lib/doorkeeper/oauth/authorization_code_request.rb
@@ -244,10 +263,14 @@ files:
244
263
  - lib/doorkeeper/orm/active_record/access_grant.rb
245
264
  - lib/doorkeeper/orm/active_record/access_token.rb
246
265
  - lib/doorkeeper/orm/active_record/application.rb
266
+ - lib/doorkeeper/orm/active_record/stale_records_cleaner.rb
247
267
  - lib/doorkeeper/rails/helpers.rb
248
268
  - lib/doorkeeper/rails/routes.rb
249
269
  - lib/doorkeeper/rails/routes/mapper.rb
250
270
  - lib/doorkeeper/rails/routes/mapping.rb
271
+ - lib/doorkeeper/rake.rb
272
+ - lib/doorkeeper/rake/db.rake
273
+ - lib/doorkeeper/rake/setup.rake
251
274
  - lib/doorkeeper/request.rb
252
275
  - lib/doorkeeper/request/authorization_code.rb
253
276
  - lib/doorkeeper/request/client_credentials.rb
@@ -257,27 +280,31 @@ files:
257
280
  - lib/doorkeeper/request/strategy.rb
258
281
  - lib/doorkeeper/request/token.rb
259
282
  - lib/doorkeeper/server.rb
283
+ - lib/doorkeeper/stale_records_cleaner.rb
260
284
  - lib/doorkeeper/validations.rb
261
285
  - lib/doorkeeper/version.rb
262
- - lib/generators/doorkeeper/add_client_confidentiality_generator.rb
263
286
  - lib/generators/doorkeeper/application_owner_generator.rb
287
+ - lib/generators/doorkeeper/confidential_applications_generator.rb
264
288
  - lib/generators/doorkeeper/install_generator.rb
265
289
  - lib/generators/doorkeeper/migration_generator.rb
290
+ - lib/generators/doorkeeper/pkce_generator.rb
266
291
  - lib/generators/doorkeeper/previous_refresh_token_generator.rb
267
292
  - lib/generators/doorkeeper/templates/README
268
- - lib/generators/doorkeeper/templates/add_confidential_to_application_migration.rb.erb
293
+ - lib/generators/doorkeeper/templates/add_confidential_to_applications.rb.erb
269
294
  - lib/generators/doorkeeper/templates/add_owner_to_application_migration.rb.erb
270
295
  - lib/generators/doorkeeper/templates/add_previous_refresh_token_to_access_tokens.rb.erb
296
+ - lib/generators/doorkeeper/templates/enable_pkce_migration.rb.erb
271
297
  - lib/generators/doorkeeper/templates/initializer.rb
272
298
  - lib/generators/doorkeeper/templates/migration.rb.erb
273
299
  - lib/generators/doorkeeper/views_generator.rb
274
- - spec/controllers/application_metal_controller.rb
300
+ - spec/controllers/application_metal_controller_spec.rb
275
301
  - spec/controllers/applications_controller_spec.rb
276
302
  - spec/controllers/authorizations_controller_spec.rb
277
303
  - spec/controllers/protected_resources_controller_spec.rb
278
304
  - spec/controllers/token_info_controller_spec.rb
279
305
  - spec/controllers/tokens_controller_spec.rb
280
306
  - spec/dummy/Rakefile
307
+ - spec/dummy/app/assets/config/manifest.js
281
308
  - spec/dummy/app/controllers/application_controller.rb
282
309
  - spec/dummy/app/controllers/custom_authorizations_controller.rb
283
310
  - spec/dummy/app/controllers/full_protected_resources_controller.rb
@@ -309,7 +336,8 @@ files:
309
336
  - spec/dummy/db/migrate/20151223192035_create_doorkeeper_tables.rb
310
337
  - spec/dummy/db/migrate/20151223200000_add_owner_to_application.rb
311
338
  - spec/dummy/db/migrate/20160320211015_add_previous_refresh_token_to_access_tokens.rb
312
- - spec/dummy/db/migrate/20180210183654_add_confidential_to_application.rb
339
+ - spec/dummy/db/migrate/20170822064514_enable_pkce.rb
340
+ - spec/dummy/db/migrate/20180210183654_add_confidential_to_applications.rb
313
341
  - spec/dummy/db/schema.rb
314
342
  - spec/dummy/public/404.html
315
343
  - spec/dummy/public/422.html
@@ -318,8 +346,10 @@ files:
318
346
  - spec/dummy/script/rails
319
347
  - spec/factories.rb
320
348
  - spec/generators/application_owner_generator_spec.rb
349
+ - spec/generators/confidential_applications_generator_spec.rb
321
350
  - spec/generators/install_generator_spec.rb
322
351
  - spec/generators/migration_generator_spec.rb
352
+ - spec/generators/pkce_generator_spec.rb
323
353
  - spec/generators/previous_refresh_token_generator_spec.rb
324
354
  - spec/generators/templates/routes.rb
325
355
  - spec/generators/views_generator_spec.rb
@@ -359,6 +389,7 @@ files:
359
389
  - spec/lib/oauth/token_spec.rb
360
390
  - spec/lib/request/strategy_spec.rb
361
391
  - spec/lib/server_spec.rb
392
+ - spec/lib/stale_records_cleaner_spec.rb
362
393
  - spec/models/doorkeeper/access_grant_spec.rb
363
394
  - spec/models/doorkeeper/access_token_spec.rb
364
395
  - spec/models/doorkeeper/application_spec.rb
@@ -382,7 +413,8 @@ files:
382
413
  - spec/routing/scoped_routes_spec.rb
383
414
  - spec/spec_helper.rb
384
415
  - spec/spec_helper_integration.rb
385
- - spec/support/dependencies/factory_girl.rb
416
+ - spec/support/dependencies/factory_bot.rb
417
+ - spec/support/doorkeeper_rspec.rb
386
418
  - spec/support/helpers/access_token_request_helper.rb
387
419
  - spec/support/helpers/authorization_request_helper.rb
388
420
  - spec/support/helpers/config_helper.rb
@@ -400,25 +432,7 @@ homepage: https://github.com/doorkeeper-gem/doorkeeper
400
432
  licenses:
401
433
  - MIT
402
434
  metadata: {}
403
- post_install_message: |2+
404
-
405
-
406
- WARNING: This is a security release that addresses token revocation not working for public apps (CVE-2018-1000211)
407
-
408
- There is no breaking change in this release, however to take advantage of the security fix you must:
409
-
410
- 1. Run `rails generate doorkeeper:add_client_confidentiality` for the migration
411
- 2. Review your OAuth apps and determine which ones exclusively use public grant flows (eg implicit)
412
- 3. Update their `confidential` column to `false` for those public apps
413
-
414
- This is a backported security release.
415
-
416
- For more information:
417
-
418
- * https://github.com/doorkeeper-gem/doorkeeper/pull/1119
419
- * https://github.com/doorkeeper-gem/doorkeeper/issues/891
420
-
421
-
435
+ post_install_message:
422
436
  rdoc_options: []
423
437
  require_paths:
424
438
  - lib
@@ -433,19 +447,19 @@ required_rubygems_version: !ruby/object:Gem::Requirement
433
447
  - !ruby/object:Gem::Version
434
448
  version: '0'
435
449
  requirements: []
436
- rubyforge_project:
437
- rubygems_version: 2.6.11
450
+ rubygems_version: 3.0.2
438
451
  signing_key:
439
452
  specification_version: 4
440
453
  summary: OAuth 2 provider for Rails and Grape
441
454
  test_files:
442
- - spec/controllers/application_metal_controller.rb
455
+ - spec/controllers/application_metal_controller_spec.rb
443
456
  - spec/controllers/applications_controller_spec.rb
444
457
  - spec/controllers/authorizations_controller_spec.rb
445
458
  - spec/controllers/protected_resources_controller_spec.rb
446
459
  - spec/controllers/token_info_controller_spec.rb
447
460
  - spec/controllers/tokens_controller_spec.rb
448
461
  - spec/dummy/Rakefile
462
+ - spec/dummy/app/assets/config/manifest.js
449
463
  - spec/dummy/app/controllers/application_controller.rb
450
464
  - spec/dummy/app/controllers/custom_authorizations_controller.rb
451
465
  - spec/dummy/app/controllers/full_protected_resources_controller.rb
@@ -477,7 +491,8 @@ test_files:
477
491
  - spec/dummy/db/migrate/20151223192035_create_doorkeeper_tables.rb
478
492
  - spec/dummy/db/migrate/20151223200000_add_owner_to_application.rb
479
493
  - spec/dummy/db/migrate/20160320211015_add_previous_refresh_token_to_access_tokens.rb
480
- - spec/dummy/db/migrate/20180210183654_add_confidential_to_application.rb
494
+ - spec/dummy/db/migrate/20170822064514_enable_pkce.rb
495
+ - spec/dummy/db/migrate/20180210183654_add_confidential_to_applications.rb
481
496
  - spec/dummy/db/schema.rb
482
497
  - spec/dummy/public/404.html
483
498
  - spec/dummy/public/422.html
@@ -486,8 +501,10 @@ test_files:
486
501
  - spec/dummy/script/rails
487
502
  - spec/factories.rb
488
503
  - spec/generators/application_owner_generator_spec.rb
504
+ - spec/generators/confidential_applications_generator_spec.rb
489
505
  - spec/generators/install_generator_spec.rb
490
506
  - spec/generators/migration_generator_spec.rb
507
+ - spec/generators/pkce_generator_spec.rb
491
508
  - spec/generators/previous_refresh_token_generator_spec.rb
492
509
  - spec/generators/templates/routes.rb
493
510
  - spec/generators/views_generator_spec.rb
@@ -527,6 +544,7 @@ test_files:
527
544
  - spec/lib/oauth/token_spec.rb
528
545
  - spec/lib/request/strategy_spec.rb
529
546
  - spec/lib/server_spec.rb
547
+ - spec/lib/stale_records_cleaner_spec.rb
530
548
  - spec/models/doorkeeper/access_grant_spec.rb
531
549
  - spec/models/doorkeeper/access_token_spec.rb
532
550
  - spec/models/doorkeeper/application_spec.rb
@@ -550,7 +568,8 @@ test_files:
550
568
  - spec/routing/scoped_routes_spec.rb
551
569
  - spec/spec_helper.rb
552
570
  - spec/spec_helper_integration.rb
553
- - spec/support/dependencies/factory_girl.rb
571
+ - spec/support/dependencies/factory_bot.rb
572
+ - spec/support/doorkeeper_rspec.rb
554
573
  - spec/support/helpers/access_token_request_helper.rb
555
574
  - spec/support/helpers/authorization_request_helper.rb
556
575
  - spec/support/helpers/config_helper.rb
@@ -1,31 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'rails/generators/active_record'
4
-
5
- module Doorkeeper
6
- class AddClientConfidentialityGenerator < ::Rails::Generators::Base
7
- include ::Rails::Generators::Migration
8
- source_root File.expand_path('templates', __dir__)
9
- desc 'Adds a migration to fix CVE-2018-1000211.'
10
-
11
- def install
12
- migration_template(
13
- 'add_confidential_to_application_migration.rb.erb',
14
- 'db/migrate/add_confidential_to_doorkeeper_application.rb',
15
- migration_version: migration_version
16
- )
17
- end
18
-
19
- def self.next_migration_number(dirname)
20
- ::ActiveRecord::Generators::Base.next_migration_number(dirname)
21
- end
22
-
23
- private
24
-
25
- def migration_version
26
- if ::ActiveRecord::VERSION::MAJOR >= 5
27
- "[#{::ActiveRecord::VERSION::MAJOR}.#{::ActiveRecord::VERSION::MINOR}]"
28
- end
29
- end
30
- end
31
- end
@@ -1,11 +0,0 @@
1
- class AddConfidentialToDoorkeeperApplication < ActiveRecord::Migration<%= migration_version %>
2
- def change
3
- add_column(
4
- :oauth_applications,
5
- :confidential,
6
- :boolean,
7
- null: false,
8
- default: true # maintaining backwards compatibility: require secrets
9
- )
10
- end
11
- end
@@ -1,10 +0,0 @@
1
- require "spec_helper_integration"
2
-
3
- describe Doorkeeper::ApplicationMetalController do
4
- it "lazy run hooks" do
5
- i = 0
6
- ActiveSupport.on_load(:doorkeeper_metal_controller) { i += 1 }
7
-
8
- expect(i).to eq 1
9
- end
10
- end