doorkeeper 4.2.6 → 5.0.0.rc1

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.
Files changed (205) hide show
  1. checksums.yaml +4 -4
  2. data/.github/ISSUE_TEMPLATE.md +25 -0
  3. data/.github/PULL_REQUEST_TEMPLATE.md +17 -0
  4. data/.gitignore +2 -1
  5. data/.hound.yml +2 -13
  6. data/.rubocop.yml +17 -0
  7. data/.travis.yml +19 -5
  8. data/Appraisals +8 -4
  9. data/CODE_OF_CONDUCT.md +46 -0
  10. data/Gemfile +1 -1
  11. data/NEWS.md +77 -0
  12. data/README.md +169 -34
  13. data/Rakefile +6 -0
  14. data/SECURITY.md +15 -0
  15. data/app/assets/stylesheets/doorkeeper/admin/application.css +2 -2
  16. data/app/controllers/doorkeeper/application_controller.rb +2 -5
  17. data/app/controllers/doorkeeper/application_metal_controller.rb +4 -0
  18. data/app/controllers/doorkeeper/applications_controller.rb +47 -13
  19. data/app/controllers/doorkeeper/authorizations_controller.rb +55 -12
  20. data/app/controllers/doorkeeper/authorized_applications_controller.rb +15 -1
  21. data/app/controllers/doorkeeper/tokens_controller.rb +15 -7
  22. data/app/helpers/doorkeeper/dashboard_helper.rb +8 -6
  23. data/app/validators/redirect_uri_validator.rb +13 -2
  24. data/app/views/doorkeeper/applications/_delete_form.html.erb +3 -1
  25. data/app/views/doorkeeper/applications/_form.html.erb +31 -19
  26. data/app/views/doorkeeper/applications/edit.html.erb +1 -1
  27. data/app/views/doorkeeper/applications/index.html.erb +18 -6
  28. data/app/views/doorkeeper/applications/new.html.erb +1 -1
  29. data/app/views/doorkeeper/applications/show.html.erb +8 -5
  30. data/app/views/doorkeeper/authorizations/error.html.erb +1 -1
  31. data/app/views/doorkeeper/authorizations/new.html.erb +4 -0
  32. data/app/views/doorkeeper/authorized_applications/index.html.erb +0 -1
  33. data/app/views/layouts/doorkeeper/admin.html.erb +15 -15
  34. data/config/locales/en.yml +18 -6
  35. data/doorkeeper.gemspec +6 -5
  36. data/gemfiles/rails_4_2.gemfile +6 -4
  37. data/gemfiles/rails_5_0.gemfile +4 -4
  38. data/gemfiles/rails_5_1.gemfile +6 -7
  39. data/gemfiles/rails_5_2.gemfile +12 -0
  40. data/gemfiles/rails_master.gemfile +14 -0
  41. data/lib/doorkeeper/config.rb +107 -68
  42. data/lib/doorkeeper/engine.rb +7 -3
  43. data/lib/doorkeeper/errors.rb +2 -5
  44. data/lib/doorkeeper/grape/helpers.rb +14 -9
  45. data/lib/doorkeeper/helpers/controller.rb +15 -6
  46. data/lib/doorkeeper/models/access_grant_mixin.rb +52 -23
  47. data/lib/doorkeeper/models/access_token_mixin.rb +51 -52
  48. data/lib/doorkeeper/models/application_mixin.rb +16 -30
  49. data/lib/doorkeeper/models/concerns/expirable.rb +7 -5
  50. data/lib/doorkeeper/models/concerns/orderable.rb +13 -0
  51. data/lib/doorkeeper/models/concerns/scopes.rb +1 -1
  52. data/lib/doorkeeper/oauth/authorization/code.rb +31 -8
  53. data/lib/doorkeeper/oauth/authorization/context.rb +15 -0
  54. data/lib/doorkeeper/oauth/authorization/token.rb +41 -20
  55. data/lib/doorkeeper/oauth/authorization_code_request.rb +33 -3
  56. data/lib/doorkeeper/oauth/base_request.rb +22 -7
  57. data/lib/doorkeeper/oauth/client/credentials.rb +6 -4
  58. data/lib/doorkeeper/oauth/client.rb +2 -2
  59. data/lib/doorkeeper/oauth/client_credentials/issuer.rb +6 -1
  60. data/lib/doorkeeper/oauth/client_credentials/validation.rb +4 -2
  61. data/lib/doorkeeper/oauth/error.rb +2 -2
  62. data/lib/doorkeeper/oauth/error_response.rb +11 -4
  63. data/lib/doorkeeper/oauth/forbidden_token_response.rb +1 -1
  64. data/lib/doorkeeper/oauth/helpers/scope_checker.rb +0 -8
  65. data/lib/doorkeeper/oauth/helpers/uri_checker.rb +15 -0
  66. data/lib/doorkeeper/oauth/invalid_token_response.rb +3 -4
  67. data/lib/doorkeeper/oauth/password_access_token_request.rb +8 -4
  68. data/lib/doorkeeper/oauth/pre_authorization.rb +45 -13
  69. data/lib/doorkeeper/oauth/refresh_token_request.rb +7 -1
  70. data/lib/doorkeeper/oauth/scopes.rb +19 -9
  71. data/lib/doorkeeper/oauth/token.rb +6 -3
  72. data/lib/doorkeeper/oauth/token_introspection.rb +128 -0
  73. data/lib/doorkeeper/oauth/token_response.rb +4 -2
  74. data/lib/doorkeeper/oauth.rb +13 -0
  75. data/lib/doorkeeper/orm/active_record/access_grant.rb +27 -0
  76. data/lib/doorkeeper/orm/active_record/access_token.rb +21 -20
  77. data/lib/doorkeeper/orm/active_record/application.rb +34 -0
  78. data/lib/doorkeeper/orm/active_record/stale_records_cleaner.rb +26 -0
  79. data/lib/doorkeeper/orm/active_record.rb +21 -8
  80. data/lib/doorkeeper/rails/helpers.rb +7 -10
  81. data/lib/doorkeeper/rails/routes.rb +21 -7
  82. data/lib/doorkeeper/rake/db.rake +40 -0
  83. data/lib/doorkeeper/rake/setup.rake +6 -0
  84. data/lib/doorkeeper/rake.rb +14 -0
  85. data/lib/doorkeeper/request/password.rb +1 -11
  86. data/lib/doorkeeper/request.rb +29 -23
  87. data/lib/doorkeeper/validations.rb +3 -2
  88. data/lib/doorkeeper/version.rb +14 -1
  89. data/lib/doorkeeper.rb +6 -17
  90. data/lib/generators/doorkeeper/application_owner_generator.rb +26 -12
  91. data/lib/generators/doorkeeper/confidential_applications_generator.rb +32 -0
  92. data/lib/generators/doorkeeper/install_generator.rb +17 -9
  93. data/lib/generators/doorkeeper/migration_generator.rb +26 -9
  94. data/lib/generators/doorkeeper/pkce_generator.rb +32 -0
  95. data/lib/generators/doorkeeper/previous_refresh_token_generator.rb +31 -20
  96. data/lib/generators/doorkeeper/templates/add_confidential_to_applications.rb.erb +13 -0
  97. data/lib/generators/doorkeeper/templates/{add_owner_to_application_migration.rb → add_owner_to_application_migration.rb.erb} +1 -1
  98. data/lib/generators/doorkeeper/templates/{add_previous_refresh_token_to_access_tokens.rb → add_previous_refresh_token_to_access_tokens.rb.erb} +1 -1
  99. data/lib/generators/doorkeeper/templates/enable_pkce_migration.rb.erb +6 -0
  100. data/lib/generators/doorkeeper/templates/initializer.rb +88 -10
  101. data/lib/generators/doorkeeper/templates/{migration.rb → migration.rb.erb} +2 -1
  102. data/lib/generators/doorkeeper/views_generator.rb +3 -1
  103. data/spec/controllers/application_metal_controller_spec.rb +50 -0
  104. data/spec/controllers/applications_controller_spec.rb +141 -17
  105. data/spec/controllers/authorizations_controller_spec.rb +255 -20
  106. data/spec/controllers/protected_resources_controller_spec.rb +44 -35
  107. data/spec/controllers/token_info_controller_spec.rb +17 -21
  108. data/spec/controllers/tokens_controller_spec.rb +142 -10
  109. data/spec/dummy/app/assets/config/manifest.js +2 -0
  110. data/spec/dummy/config/environments/test.rb +4 -5
  111. data/spec/dummy/config/initializers/doorkeeper.rb +18 -1
  112. data/spec/dummy/config/initializers/{active_record_belongs_to_required_by_default.rb → new_framework_defaults.rb} +5 -1
  113. data/spec/dummy/config/initializers/secret_token.rb +0 -1
  114. data/spec/dummy/config/routes.rb +3 -42
  115. data/spec/dummy/db/migrate/20111122132257_create_users.rb +3 -1
  116. data/spec/dummy/db/migrate/20120312140401_add_password_to_users.rb +3 -1
  117. data/spec/dummy/db/migrate/20151223192035_create_doorkeeper_tables.rb +3 -1
  118. data/spec/dummy/db/migrate/20151223200000_add_owner_to_application.rb +3 -1
  119. data/spec/dummy/db/migrate/20160320211015_add_previous_refresh_token_to_access_tokens.rb +3 -1
  120. data/spec/dummy/db/migrate/20170822064514_enable_pkce.rb +6 -0
  121. data/spec/dummy/db/migrate/20180210183654_add_confidential_to_applications.rb +13 -0
  122. data/spec/dummy/db/schema.rb +38 -37
  123. data/spec/factories.rb +1 -1
  124. data/spec/generators/application_owner_generator_spec.rb +25 -6
  125. data/spec/generators/confidential_applications_generator_spec.rb +45 -0
  126. data/spec/generators/install_generator_spec.rb +1 -1
  127. data/spec/generators/migration_generator_spec.rb +25 -4
  128. data/spec/generators/pkce_generator_spec.rb +43 -0
  129. data/spec/generators/previous_refresh_token_generator_spec.rb +57 -0
  130. data/spec/generators/views_generator_spec.rb +1 -1
  131. data/spec/grape/grape_integration_spec.rb +135 -0
  132. data/spec/helpers/doorkeeper/dashboard_helper_spec.rb +2 -2
  133. data/spec/lib/config_spec.rb +170 -22
  134. data/spec/lib/doorkeeper_spec.rb +1 -126
  135. data/spec/lib/models/expirable_spec.rb +0 -3
  136. data/spec/lib/models/revocable_spec.rb +2 -4
  137. data/spec/lib/models/scopes_spec.rb +0 -4
  138. data/spec/lib/oauth/authorization/uri_builder_spec.rb +0 -4
  139. data/spec/lib/oauth/authorization_code_request_spec.rb +63 -13
  140. data/spec/lib/oauth/base_request_spec.rb +19 -10
  141. data/spec/lib/oauth/base_response_spec.rb +1 -1
  142. data/spec/lib/oauth/client/credentials_spec.rb +5 -5
  143. data/spec/lib/oauth/client_credentials/creator_spec.rb +6 -2
  144. data/spec/lib/oauth/client_credentials/issuer_spec.rb +26 -7
  145. data/spec/lib/oauth/client_credentials/validation_spec.rb +2 -3
  146. data/spec/lib/oauth/client_credentials_integration_spec.rb +2 -2
  147. data/spec/lib/oauth/client_credentials_request_spec.rb +4 -5
  148. data/spec/lib/oauth/client_spec.rb +0 -3
  149. data/spec/lib/oauth/code_request_spec.rb +5 -5
  150. data/spec/lib/oauth/error_response_spec.rb +0 -3
  151. data/spec/lib/oauth/error_spec.rb +1 -3
  152. data/spec/lib/oauth/forbidden_token_response_spec.rb +1 -4
  153. data/spec/lib/oauth/helpers/scope_checker_spec.rb +0 -3
  154. data/spec/lib/oauth/helpers/unique_token_spec.rb +0 -1
  155. data/spec/lib/oauth/helpers/uri_checker_spec.rb +115 -3
  156. data/spec/lib/oauth/invalid_token_response_spec.rb +2 -5
  157. data/spec/lib/oauth/password_access_token_request_spec.rb +46 -5
  158. data/spec/lib/oauth/pre_authorization_spec.rb +40 -6
  159. data/spec/lib/oauth/refresh_token_request_spec.rb +30 -14
  160. data/spec/lib/oauth/scopes_spec.rb +28 -4
  161. data/spec/lib/oauth/token_request_spec.rb +10 -13
  162. data/spec/lib/oauth/token_response_spec.rb +0 -1
  163. data/spec/lib/oauth/token_spec.rb +37 -14
  164. data/spec/lib/orm/active_record/stale_records_cleaner_spec.rb +79 -0
  165. data/spec/lib/request/strategy_spec.rb +0 -1
  166. data/spec/lib/server_spec.rb +10 -0
  167. data/spec/models/doorkeeper/access_grant_spec.rb +2 -2
  168. data/spec/models/doorkeeper/access_token_spec.rb +118 -60
  169. data/spec/models/doorkeeper/application_spec.rb +101 -23
  170. data/spec/requests/applications/applications_request_spec.rb +94 -6
  171. data/spec/requests/applications/authorized_applications_spec.rb +1 -1
  172. data/spec/requests/endpoints/authorization_spec.rb +1 -1
  173. data/spec/requests/endpoints/token_spec.rb +15 -6
  174. data/spec/requests/flows/authorization_code_errors_spec.rb +1 -1
  175. data/spec/requests/flows/authorization_code_spec.rb +198 -1
  176. data/spec/requests/flows/client_credentials_spec.rb +73 -5
  177. data/spec/requests/flows/implicit_grant_errors_spec.rb +3 -3
  178. data/spec/requests/flows/implicit_grant_spec.rb +38 -11
  179. data/spec/requests/flows/password_spec.rb +160 -24
  180. data/spec/requests/flows/refresh_token_spec.rb +6 -6
  181. data/spec/requests/flows/revoke_token_spec.rb +26 -26
  182. data/spec/requests/flows/skip_authorization_spec.rb +16 -11
  183. data/spec/requests/protected_resources/metal_spec.rb +2 -2
  184. data/spec/requests/protected_resources/private_api_spec.rb +2 -2
  185. data/spec/routing/custom_controller_routes_spec.rb +63 -7
  186. data/spec/routing/default_routes_spec.rb +6 -2
  187. data/spec/routing/scoped_routes_spec.rb +16 -2
  188. data/spec/spec_helper.rb +54 -3
  189. data/spec/spec_helper_integration.rb +2 -63
  190. data/spec/support/dependencies/factory_bot.rb +2 -0
  191. data/spec/support/doorkeeper_rspec.rb +19 -0
  192. data/spec/support/helpers/access_token_request_helper.rb +1 -1
  193. data/spec/support/helpers/authorization_request_helper.rb +4 -4
  194. data/spec/support/helpers/model_helper.rb +9 -4
  195. data/spec/support/helpers/request_spec_helper.rb +10 -6
  196. data/spec/support/helpers/url_helper.rb +15 -10
  197. data/spec/support/http_method_shim.rb +12 -16
  198. data/spec/support/shared/controllers_shared_context.rb +2 -6
  199. data/spec/support/shared/models_shared_examples.rb +4 -4
  200. data/spec/validators/redirect_uri_validator_spec.rb +58 -7
  201. data/spec/version/version_spec.rb +15 -0
  202. data/vendor/assets/stylesheets/doorkeeper/bootstrap.min.css +4 -5
  203. metadata +73 -19
  204. data/spec/controllers/application_metal_controller.rb +0 -10
  205. data/spec/support/dependencies/factory_girl.rb +0 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b4b94e7f1fb4975a36ad84ccfda9bcfb0b5e2bd7
4
- data.tar.gz: fc5914c689e55572a9313caa07f2644c29f37574
3
+ metadata.gz: 1294d2df3309f8b266a7b9de07d4ebf8dd96fe27
4
+ data.tar.gz: 9eea101d6a9b5e72412a373224e8160d0d4cd897
5
5
  SHA512:
6
- metadata.gz: f90cc508667ce0ec9693925a187fbc9ae5b9eeaf95b74648c9981ceea9eaef305d9981f75d48a8b8f0e00929bcc748a51da4b013b814ffa8a9344a4fc44257e1
7
- data.tar.gz: 433cafea0488b8d0ab2d7d9b164b9510191f9a6d6534443674064e60c8ea2c0007494a9015b8c9d96a44b603182217496d4221db752c21d1cc5e56b1e377ae86
6
+ metadata.gz: a7146828263c150652126e56c7a4a177bfaecf44a02d93f7f630d99edbc5a91767e4e86964b52f68c590022ff85375dd5004b78cd621b386b9c767cc67b90a3c
7
+ data.tar.gz: 15d04141cfc2bc9161531bc5b2a5cd98ee55f8cb144b76878ffe7fffb790c6de380a3857cc30813cd979a6c301bec188da6554dcb04d2d2e910b2cb0f240e857
@@ -0,0 +1,25 @@
1
+ ### Steps to reproduce
2
+ What we need to do to see your problem or bug?
3
+
4
+ The more detailed the issue, the more likely that we will fix it ASAP.
5
+
6
+ Don't use GitHub issues for questions like "How can I do that?" —
7
+ use [StackOverflow](https://stackoverflow.com/questions/tagged/doorkeeper)
8
+ instead with the corresponding tag.
9
+
10
+ ### Expected behavior
11
+ Tell us what should happen
12
+
13
+ ### Actual behavior
14
+ Tell us what happens instead
15
+
16
+ ### System configuration
17
+ You can help us to understand your problem if you will share some very
18
+ useful information about your project environment (don't forget to
19
+ remove any confidential data if it exists).
20
+
21
+ **Doorkeeper initializer**:
22
+
23
+ **Ruby version**:
24
+
25
+ **Gemfile.lock**:
@@ -0,0 +1,17 @@
1
+ ### Summary
2
+
3
+ Provide a general description of the code changes in your pull
4
+ request... were there any bugs you had fixed? If so, mention them. If
5
+ these bugs have open GitHub issues, be sure to tag them here as well,
6
+ to keep the conversation linked together.
7
+
8
+ ### Other Information
9
+
10
+ If there's anything else that's important and relevant to your pull
11
+ request, mention that information here. This could include
12
+ benchmarks, or other information.
13
+
14
+ If you are updating NEWS.md file or are asked to update it by reviewers,
15
+ please add the changelog entry at the top of the file.
16
+
17
+ Thanks for contributing to Doorkeeper project!
data/.gitignore CHANGED
@@ -6,9 +6,9 @@ pkg/
6
6
  spec/dummy/db/*.sqlite3
7
7
  spec/dummy/log/*.log
8
8
  spec/dummy/tmp/
9
+ spec/generators/tmp
9
10
  Gemfile.lock
10
11
  gemfiles/*.lock
11
- spec/generators/tmp
12
12
  .rvmrc
13
13
  *.swp
14
14
  .idea
@@ -17,3 +17,4 @@ spec/generators/tmp
17
17
  /doc/
18
18
  /rdoc/
19
19
  coverage
20
+ *.gem
data/.hound.yml CHANGED
@@ -1,13 +1,2 @@
1
- AllCops:
2
- Exclude:
3
- - "spec/dummy/db/*"
4
-
5
- LineLength:
6
- Exclude:
7
- - spec/**/*
8
-
9
- StringLiterals:
10
- Enabled: false
11
-
12
- TrailingBlankLines:
13
- Enabled: true
1
+ ruby:
2
+ config_file: .rubocop.yml
data/.rubocop.yml ADDED
@@ -0,0 +1,17 @@
1
+ AllCops:
2
+ Exclude:
3
+ - "spec/dummy/db/*"
4
+
5
+ Metrics/BlockLength:
6
+ Exclude:
7
+ - spec/**/*
8
+
9
+ LineLength:
10
+ Exclude:
11
+ - spec/**/*
12
+
13
+ StringLiterals:
14
+ Enabled: false
15
+
16
+ TrailingBlankLines:
17
+ Enabled: true
data/.travis.yml CHANGED
@@ -4,23 +4,37 @@ sudo: false
4
4
 
5
5
  rvm:
6
6
  - 2.1
7
- - 2.2.6
8
- - 2.3.3
9
- - 2.4.0
7
+ - 2.2
8
+ - 2.3
9
+ - 2.4
10
+ - 2.5
11
+ - ruby-2.6.0-preview1
10
12
 
11
13
  before_install:
14
+ - gem update --system # Need for Ruby 2.5.0. https://github.com/travis-ci/travis-ci/issues/8978
12
15
  - gem install bundler -v '~> 1.10'
13
16
 
14
17
  gemfile:
15
18
  - gemfiles/rails_4_2.gemfile
16
19
  - gemfiles/rails_5_0.gemfile
17
20
  - gemfiles/rails_5_1.gemfile
21
+ - gemfiles/rails_5_2.gemfile
22
+ - gemfiles/rails_master.gemfile
18
23
 
19
24
  matrix:
25
+ fast_finish: true
20
26
  exclude:
21
27
  - gemfile: gemfiles/rails_5_0.gemfile
22
28
  rvm: 2.1
23
29
  - gemfile: gemfiles/rails_5_1.gemfile
24
30
  rvm: 2.1
25
- allowed_failures:
26
- - gemfile: gemfiles/rails_5_1.gemfile
31
+ - gemfile: gemfiles/rails_5_2.gemfile
32
+ rvm: 2.1
33
+ - gemfile: gemfiles/rails_master.gemfile
34
+ rvm: 2.1
35
+ - gemfile: gemfiles/rails_master.gemfile
36
+ rvm: 2.2
37
+ - gemfile: gemfiles/rails_master.gemfile
38
+ rvm: 2.3
39
+ allow_failures:
40
+ - gemfile: gemfiles/rails_master.gemfile
data/Appraisals CHANGED
@@ -4,11 +4,15 @@ end
4
4
 
5
5
  appraise "rails-5-0" do
6
6
  gem "rails", "~> 5.0.0"
7
- gem "rspec-rails", "~> 3.5"
7
+ gem "rspec-rails", "~> 3.7"
8
8
  end
9
9
 
10
10
  appraise "rails-5-1" do
11
- gem "rails", github: "rails/rails"
12
- gem "arel", github: "rails/arel"
13
- gem "rspec-rails", "~> 3.5"
11
+ gem "rails", "~> 5.1.0"
12
+ gem "rspec-rails", "~> 3.7"
13
+ end
14
+
15
+ appraise "rails-master" do
16
+ gem "rails", git: 'https://github.com/rails/rails'
17
+ gem "arel", git: 'https://github.com/rails/arel'
14
18
  end
@@ -0,0 +1,46 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ ## Our Standards
8
+
9
+ Examples of behavior that contributes to creating a positive environment include:
10
+
11
+ * Using welcoming and inclusive language
12
+ * Being respectful of differing viewpoints and experiences
13
+ * Gracefully accepting constructive criticism
14
+ * Focusing on what is best for the community
15
+ * Showing empathy towards other community members
16
+
17
+ Examples of unacceptable behavior by participants include:
18
+
19
+ * The use of sexualized language or imagery and unwelcome sexual attention or advances
20
+ * Trolling, insulting/derogatory comments, and personal or political attacks
21
+ * Public or private harassment
22
+ * Publishing others' private information, such as a physical or electronic address, without explicit permission
23
+ * Other conduct which could reasonably be considered inappropriate in a professional setting
24
+
25
+ ## Our Responsibilities
26
+
27
+ Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28
+
29
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30
+
31
+ ## Scope
32
+
33
+ This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34
+
35
+ ## Enforcement
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team members or current maintainer email, specified in gemspec. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38
+
39
+ Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40
+
41
+ ## Attribution
42
+
43
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44
+
45
+ [homepage]: http://contributor-covenant.org
46
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- gem "rails", "~> 4.2.0"
3
+ gem "rails", "~> 5.2"
4
4
 
5
5
  gem "appraisal"
6
6
 
data/NEWS.md CHANGED
@@ -1,8 +1,85 @@
1
1
  # News
2
2
 
3
+ See https://github.com/doorkeeper-gem/doorkeeper/wiki/Migration-from-old-versions for
4
+ upgrade guides.
5
+
3
6
  User-visible changes worth mentioning.
4
7
 
5
8
  ## master
9
+ - [#1089] Removed enable_pkce_without_secret configuration option
10
+ - [#1102] Expiration time based on scopes
11
+ - [#1099] All the configuration variables in `Doorkeeper.configuration` now
12
+ always return a non-nil value (`true` or `false`)
13
+ - [#1099] ORM / Query optimization: Do not revoke the refresh token if it is not enabled
14
+ in `doorkeeper.rb`
15
+ - [#996] Expiration Time Base On Grant Type
16
+ - [#997] Allow PKCE authorization_code flow as specified in RFC7636
17
+ - [#907] Fix lookup for matching tokens in certain edge-cases
18
+ - [#992] Add API option to use Doorkeeper without management views for API only
19
+ Rails applications (`api_only`)
20
+ - [#1045] Validate redirect_uri as the native URI when making authorization code requests
21
+ - [#1048] Remove deprecated `Doorkeeper#configured?`, `Doorkeeper#database_installed?`, and
22
+ `Doorkeeper#installed?` method
23
+ - [#1031] Allow public clients to authenticate without `client_secret`. Define an app as
24
+ either public or private/confidential
25
+ - [#1010] Add configuration to enforce configured scopes (`default_scopes` and
26
+ `optional_scopes`) for applications
27
+ - [#1060] Ensure that the native redirect_uri parameter matches with redirect_uri of the client
28
+ - [#1064] Add :before_successful_authorization and :after_successful_authorization hooks
29
+ - [#1069] Upgrade Bootstrap to 4 for Admin
30
+ - [#1068] Add rake task to cleanup databases that can become large over time
31
+ - [#1072] AuthorizationsController: Memoize strategy.authorize_response result to enable
32
+ subclasses to use the response object.
33
+ - [#1075] Call `before_successful_authorization` and `after_successful_authorization` hooks
34
+ on `create` action as well as `new`
35
+ - [#1082] Fix #916: remember routes mapping and use it required places (fix error with
36
+ customized Token Info route).
37
+ - [#1086, #1088] Fix bug with receiving default scopes in the token even if they are
38
+ not present in the application scopes (use scopes intersection).
39
+ - [#1076] Add config to enforce content type to application/x-www-form-urlencoded
40
+ - Fix bug with `force_ssl_in_redirect_uri` when it breaks existing applications with an
41
+ SSL redirect_uri.
42
+
43
+ ## 4.3.2
44
+
45
+ - [#1053] Support authorizing with query params in the request `redirect_uri` if explicitly present in app's `Application#redirect_uri`
46
+
47
+ ## 4.3.1
48
+
49
+ - Remove `BaseRecord` and introduce additional concern for ordering methods to fix
50
+ braking changes for Doorkeeper models.
51
+ - [#1032] Refactor BaseRequest callbacks into configurable lambdas
52
+ - [#1040] Clear mixins from ActiveRecord DSL and save only overridable API. It
53
+ allows to use this mixins in Doorkeeper ORM extensions with minimum code boilerplate.
54
+
55
+ ## 4.3.0
56
+
57
+ - [#976] Fix to invalidate the second redirect URI when the first URI is the native URI
58
+ - [#1035] Allow `Application#redirect_uri=` to handle array of URIs.
59
+ - [#1036] Allow to forbid Application redirect URI's with specific rules.
60
+ - [#1029] Deprecate `order_method` and introduce `ordered_by`. Sort applications
61
+ by `created_at` in index action.
62
+ - [#1033] Allow Doorkeeper configuration option #force_ssl_in_redirect_uri to be a callable object.
63
+ - Fix Grape integration & add specs for it
64
+ - [#913] Deferred ORM (ActiveRecord) models loading
65
+ - [#943] Fix Access Token token generation when certain errors occur in custom token generators
66
+ - [#1026] Implement RFC7662 - OAuth 2.0 Token Introspection
67
+ - [#985] Generate valid migration files for Rails >= 5
68
+ - [#972] Replace Struct subclassing with block-form initialization
69
+ - [#1003] Use URL query param to pass through native redirect auth code so automated apps can find it.
70
+ - [#868] `Scopes#&` and `Scopes#+` now take an array or any other enumerable
71
+ object.
72
+ - [#1019] Remove translation not in use: `invalid_resource_owner`.
73
+ - Use Ruby 2 hash style syntax (min required Ruby version = 2.1)
74
+ - [#948] Make Scopes.<=> work with any "other" value.
75
+ - [#974] Redirect URI is checked without query params within AuthorizationCodeRequest.
76
+ - [#1004] More explicit help text for `native_redirect_uri`.
77
+ - [#1023] Update Ruby versions and test against 2.5.0 on Travis CI.
78
+ - [#1024] Migrate from FactoryGirl to FactoryBot.
79
+ - [#1025] Improve documentation for adding foreign keys
80
+ - [#1028] Make it possible to have composite strategy names.
81
+
82
+ ## 4.2.6
6
83
 
7
84
  - [#970] Escape certain attributes in authorization forms.
8
85