doorkeeper 5.0.3 → 5.1.0
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/.hound.yml +2 -1
- data/.rubocop.yml +37 -4
- data/.travis.yml +11 -21
- data/Appraisals +29 -7
- data/Dangerfile +5 -2
- data/Gemfile +19 -5
- data/NEWS.md +81 -21
- data/README.md +75 -485
- data/Rakefile +10 -8
- data/app/controllers/doorkeeper/application_controller.rb +1 -2
- data/app/controllers/doorkeeper/application_metal_controller.rb +2 -13
- data/app/controllers/doorkeeper/applications_controller.rb +20 -8
- data/app/controllers/doorkeeper/authorized_applications_controller.rb +1 -1
- data/app/controllers/doorkeeper/token_info_controller.rb +2 -2
- data/app/controllers/doorkeeper/tokens_controller.rb +11 -11
- data/app/helpers/doorkeeper/dashboard_helper.rb +1 -1
- data/app/validators/redirect_uri_validator.rb +5 -2
- data/app/views/doorkeeper/applications/_form.html.erb +6 -0
- data/app/views/doorkeeper/applications/show.html.erb +1 -1
- data/app/views/layouts/doorkeeper/admin.html.erb +5 -3
- data/bin/console +16 -0
- data/config/locales/en.yml +1 -0
- data/doorkeeper.gemspec +24 -21
- data/gemfiles/rails_5_0.gemfile +9 -4
- data/gemfiles/rails_5_1.gemfile +9 -4
- data/gemfiles/rails_5_2.gemfile +10 -5
- data/gemfiles/rails_6_0.gemfile +17 -0
- data/gemfiles/rails_master.gemfile +9 -9
- data/lib/doorkeeper/config/option.rb +64 -0
- data/lib/doorkeeper/config.rb +191 -75
- data/lib/doorkeeper/engine.rb +1 -1
- data/lib/doorkeeper/grape/authorization_decorator.rb +4 -4
- data/lib/doorkeeper/grape/helpers.rb +3 -3
- data/lib/doorkeeper/helpers/controller.rb +3 -2
- data/lib/doorkeeper/models/access_grant_mixin.rb +20 -3
- data/lib/doorkeeper/models/access_token_mixin.rb +63 -19
- data/lib/doorkeeper/models/application_mixin.rb +43 -1
- data/lib/doorkeeper/models/concerns/expirable.rb +4 -2
- data/lib/doorkeeper/models/concerns/ownership.rb +1 -6
- data/lib/doorkeeper/models/concerns/reusable.rb +19 -0
- data/lib/doorkeeper/models/concerns/revocable.rb +2 -1
- data/lib/doorkeeper/models/concerns/scopes.rb +5 -1
- data/lib/doorkeeper/models/concerns/secret_storable.rb +108 -0
- data/lib/doorkeeper/oauth/authorization/code.rb +2 -2
- data/lib/doorkeeper/oauth/authorization/token.rb +12 -7
- data/lib/doorkeeper/oauth/authorization/uri_builder.rb +1 -1
- data/lib/doorkeeper/oauth/authorization_code_request.rb +6 -4
- data/lib/doorkeeper/oauth/client.rb +1 -1
- data/lib/doorkeeper/oauth/client_credentials/validation.rb +5 -4
- data/lib/doorkeeper/oauth/client_credentials_request.rb +1 -1
- data/lib/doorkeeper/oauth/code_response.rb +2 -2
- data/lib/doorkeeper/oauth/error_response.rb +10 -6
- data/lib/doorkeeper/oauth/forbidden_token_response.rb +1 -1
- data/lib/doorkeeper/oauth/helpers/scope_checker.rb +23 -8
- data/lib/doorkeeper/oauth/helpers/unique_token.rb +13 -1
- data/lib/doorkeeper/oauth/helpers/uri_checker.rb +37 -1
- data/lib/doorkeeper/oauth/invalid_token_response.rb +5 -1
- data/lib/doorkeeper/oauth/password_access_token_request.rb +7 -2
- data/lib/doorkeeper/oauth/pre_authorization.rb +11 -5
- data/lib/doorkeeper/oauth/refresh_token_request.rb +5 -2
- data/lib/doorkeeper/oauth/scopes.rb +5 -3
- data/lib/doorkeeper/oauth/token.rb +2 -2
- data/lib/doorkeeper/oauth/token_introspection.rb +74 -8
- data/lib/doorkeeper/oauth/token_response.rb +9 -9
- data/lib/doorkeeper/oauth.rb +5 -5
- data/lib/doorkeeper/orm/active_record/access_grant.rb +27 -13
- data/lib/doorkeeper/orm/active_record/access_token.rb +6 -13
- data/lib/doorkeeper/orm/active_record/application.rb +21 -57
- data/lib/doorkeeper/orm/active_record/stale_records_cleaner.rb +10 -3
- data/lib/doorkeeper/orm/active_record.rb +6 -6
- data/lib/doorkeeper/rails/helpers.rb +1 -1
- data/lib/doorkeeper/rails/routes/mapping.rb +7 -7
- data/lib/doorkeeper/rails/routes.rb +11 -11
- data/lib/doorkeeper/rake/db.rake +13 -13
- data/lib/doorkeeper/rake.rb +1 -1
- data/lib/doorkeeper/request.rb +1 -1
- data/lib/doorkeeper/secret_storing/base.rb +64 -0
- data/lib/doorkeeper/secret_storing/bcrypt.rb +60 -0
- data/lib/doorkeeper/secret_storing/plain.rb +33 -0
- data/lib/doorkeeper/secret_storing/sha256_hash.rb +26 -0
- data/lib/doorkeeper/stale_records_cleaner.rb +1 -1
- data/lib/doorkeeper/version.rb +3 -3
- data/lib/doorkeeper.rb +69 -60
- data/lib/generators/doorkeeper/application_owner_generator.rb +10 -9
- data/lib/generators/doorkeeper/confidential_applications_generator.rb +10 -9
- data/lib/generators/doorkeeper/install_generator.rb +11 -9
- data/lib/generators/doorkeeper/migration_generator.rb +9 -9
- data/lib/generators/doorkeeper/pkce_generator.rb +10 -9
- data/lib/generators/doorkeeper/previous_refresh_token_generator.rb +10 -9
- data/lib/generators/doorkeeper/templates/initializer.rb +120 -13
- data/lib/generators/doorkeeper/templates/migration.rb.erb +15 -7
- data/lib/generators/doorkeeper/views_generator.rb +6 -4
- data/spec/controllers/application_metal_controller_spec.rb +24 -10
- data/spec/controllers/applications_controller_spec.rb +54 -52
- data/spec/controllers/authorizations_controller_spec.rb +139 -145
- data/spec/controllers/protected_resources_controller_spec.rb +78 -76
- data/spec/controllers/token_info_controller_spec.rb +14 -12
- data/spec/controllers/tokens_controller_spec.rb +167 -108
- data/spec/dummy/Rakefile +3 -1
- data/spec/dummy/app/controllers/application_controller.rb +3 -1
- data/spec/dummy/app/controllers/custom_authorizations_controller.rb +2 -0
- data/spec/dummy/app/controllers/full_protected_resources_controller.rb +4 -2
- data/spec/dummy/app/controllers/home_controller.rb +5 -3
- data/spec/dummy/app/controllers/metal_controller.rb +2 -0
- data/spec/dummy/app/controllers/semi_protected_resources_controller.rb +4 -2
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/models/user.rb +2 -0
- data/spec/dummy/config/application.rb +25 -1
- data/spec/dummy/config/environments/development.rb +2 -0
- data/spec/dummy/config/environments/production.rb +2 -0
- data/spec/dummy/config/environments/test.rb +3 -1
- data/spec/dummy/config/initializers/backtrace_silencers.rb +2 -0
- data/spec/dummy/config/initializers/doorkeeper.rb +5 -2
- data/spec/dummy/config/initializers/secret_token.rb +3 -1
- data/spec/dummy/config/initializers/session_store.rb +3 -1
- data/spec/dummy/config/initializers/wrap_parameters.rb +2 -0
- data/spec/dummy/config.ru +3 -1
- data/spec/dummy/db/migrate/20151223192035_create_doorkeeper_tables.rb +17 -10
- data/spec/dummy/db/migrate/20170822064514_enable_pkce.rb +2 -0
- data/spec/dummy/db/schema.rb +1 -1
- data/spec/dummy/script/rails +5 -3
- data/spec/factories.rb +8 -6
- data/spec/generators/application_owner_generator_spec.rb +13 -26
- data/spec/generators/confidential_applications_generator_spec.rb +12 -28
- data/spec/generators/install_generator_spec.rb +17 -15
- data/spec/generators/migration_generator_spec.rb +13 -26
- data/spec/generators/pkce_generator_spec.rb +11 -26
- data/spec/generators/previous_refresh_token_generator_spec.rb +16 -29
- data/spec/generators/templates/routes.rb +2 -0
- data/spec/generators/views_generator_spec.rb +14 -12
- data/spec/grape/grape_integration_spec.rb +34 -32
- data/spec/helpers/doorkeeper/dashboard_helper_spec.rb +9 -7
- data/spec/lib/config_spec.rb +268 -99
- data/spec/lib/doorkeeper_spec.rb +3 -1
- data/spec/lib/models/expirable_spec.rb +22 -8
- data/spec/lib/models/reusable_spec.rb +40 -0
- data/spec/lib/models/revocable_spec.rb +8 -6
- data/spec/lib/models/scopes_spec.rb +27 -13
- data/spec/lib/models/secret_storable_spec.rb +135 -0
- data/spec/lib/oauth/authorization/uri_builder_spec.rb +17 -15
- data/spec/lib/oauth/authorization_code_request_spec.rb +34 -11
- data/spec/lib/oauth/base_request_spec.rb +20 -8
- data/spec/lib/oauth/base_response_spec.rb +3 -1
- data/spec/lib/oauth/client/credentials_spec.rb +24 -22
- data/spec/lib/oauth/client_credentials/creator_spec.rb +56 -10
- data/spec/lib/oauth/client_credentials/issuer_spec.rb +27 -18
- data/spec/lib/oauth/client_credentials/validation_spec.rb +20 -15
- data/spec/lib/oauth/client_credentials_integration_spec.rb +7 -5
- data/spec/lib/oauth/client_credentials_request_spec.rb +27 -21
- data/spec/lib/oauth/client_spec.rb +15 -13
- data/spec/lib/oauth/code_request_spec.rb +8 -6
- data/spec/lib/oauth/code_response_spec.rb +9 -7
- data/spec/lib/oauth/error_response_spec.rb +19 -11
- data/spec/lib/oauth/error_spec.rb +4 -2
- data/spec/lib/oauth/forbidden_token_response_spec.rb +7 -5
- data/spec/lib/oauth/helpers/scope_checker_spec.rb +68 -31
- data/spec/lib/oauth/helpers/unique_token_spec.rb +8 -6
- data/spec/lib/oauth/helpers/uri_checker_spec.rb +115 -95
- data/spec/lib/oauth/invalid_token_response_spec.rb +3 -1
- data/spec/lib/oauth/password_access_token_request_spec.rb +79 -30
- data/spec/lib/oauth/pre_authorization_spec.rb +80 -54
- data/spec/lib/oauth/refresh_token_request_spec.rb +36 -33
- data/spec/lib/oauth/scopes_spec.rb +63 -61
- data/spec/lib/oauth/token_request_spec.rb +79 -24
- data/spec/lib/oauth/token_response_spec.rb +40 -38
- data/spec/lib/oauth/token_spec.rb +60 -44
- data/spec/lib/request/strategy_spec.rb +3 -1
- data/spec/lib/secret_storing/base_spec.rb +60 -0
- data/spec/lib/secret_storing/bcrypt_spec.rb +49 -0
- data/spec/lib/secret_storing/plain_spec.rb +44 -0
- data/spec/lib/secret_storing/sha256_hash_spec.rb +48 -0
- data/spec/lib/server_spec.rb +16 -14
- data/spec/lib/stale_records_cleaner_spec.rb +17 -17
- data/spec/models/doorkeeper/access_grant_spec.rb +80 -15
- data/spec/models/doorkeeper/access_token_spec.rb +198 -73
- data/spec/models/doorkeeper/application_spec.rb +280 -288
- data/spec/requests/applications/applications_request_spec.rb +98 -66
- data/spec/requests/applications/authorized_applications_spec.rb +20 -18
- data/spec/requests/endpoints/authorization_spec.rb +25 -23
- data/spec/requests/endpoints/token_spec.rb +38 -36
- data/spec/requests/flows/authorization_code_errors_spec.rb +26 -24
- data/spec/requests/flows/authorization_code_spec.rb +193 -151
- data/spec/requests/flows/client_credentials_spec.rb +54 -52
- data/spec/requests/flows/implicit_grant_errors_spec.rb +10 -8
- data/spec/requests/flows/implicit_grant_spec.rb +27 -25
- data/spec/requests/flows/password_spec.rb +59 -55
- data/spec/requests/flows/refresh_token_spec.rb +45 -43
- data/spec/requests/flows/revoke_token_spec.rb +40 -54
- data/spec/requests/flows/skip_authorization_spec.rb +23 -21
- data/spec/requests/protected_resources/metal_spec.rb +7 -5
- data/spec/requests/protected_resources/private_api_spec.rb +35 -33
- data/spec/routing/custom_controller_routes_spec.rb +71 -65
- data/spec/routing/default_routes_spec.rb +22 -20
- data/spec/routing/scoped_routes_spec.rb +20 -18
- data/spec/spec_helper.rb +15 -13
- data/spec/spec_helper_integration.rb +3 -1
- data/spec/support/dependencies/factory_bot.rb +3 -1
- data/spec/support/doorkeeper_rspec.rb +3 -1
- data/spec/support/helpers/access_token_request_helper.rb +3 -1
- data/spec/support/helpers/authorization_request_helper.rb +4 -2
- data/spec/support/helpers/config_helper.rb +2 -0
- data/spec/support/helpers/model_helper.rb +3 -1
- data/spec/support/helpers/request_spec_helper.rb +5 -3
- data/spec/support/helpers/url_helper.rb +9 -7
- data/spec/support/http_method_shim.rb +4 -9
- data/spec/support/orm/active_record.rb +3 -1
- data/spec/support/shared/controllers_shared_context.rb +18 -16
- data/spec/support/shared/hashing_shared_context.rb +36 -0
- data/spec/support/shared/models_shared_examples.rb +12 -10
- data/spec/validators/redirect_uri_validator_spec.rb +74 -45
- data/spec/version/version_spec.rb +7 -5
- metadata +60 -26
- data/gemfiles/rails_4_2.gemfile +0 -13
- data/spec/dummy/config/initializers/new_framework_defaults.rb +0 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d8ea67fd14f902f63a276aed1f57a134c39fa02322d4b1f114571e2a90310ead
|
|
4
|
+
data.tar.gz: 44f9f0b886117c6dabe6a09c236107ba6b8c3469b40526a4f6c10f2e4b3e8eac
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2aa8f4fbe445a84f98035e8ebeb99e715860fb7d29637d8e6cca994bf18a9ba7c051d38fda66829a5dd260f93ee74ff9f6f6d863e610203fa690da7b698b7da1
|
|
7
|
+
data.tar.gz: 5d474565c95e341b7b4773a7c1e2a782fa1bc27c4f22874428db52ceb4df10ccbb342420ba5266ba0d779380d42df3576f56449d390ecbf795e4deee50bdaff4
|
data/.hound.yml
CHANGED
data/.rubocop.yml
CHANGED
|
@@ -1,17 +1,50 @@
|
|
|
1
1
|
AllCops:
|
|
2
|
+
TargetRubyVersion: 2.4
|
|
2
3
|
Exclude:
|
|
3
4
|
- "spec/dummy/db/*"
|
|
5
|
+
- "spec/dummy/config/*"
|
|
6
|
+
- "Dangerfile"
|
|
7
|
+
- "gemfiles/*.gemfile"
|
|
4
8
|
|
|
5
9
|
Metrics/BlockLength:
|
|
6
10
|
Exclude:
|
|
7
11
|
- spec/**/*
|
|
12
|
+
- lib/doorkeeper/rake/*
|
|
8
13
|
|
|
9
|
-
LineLength:
|
|
14
|
+
Metrics/LineLength:
|
|
10
15
|
Exclude:
|
|
11
16
|
- spec/**/*
|
|
17
|
+
Max: 100
|
|
12
18
|
|
|
13
|
-
|
|
14
|
-
|
|
19
|
+
Metrics/MethodLength:
|
|
20
|
+
Exclude:
|
|
21
|
+
- spec/dummy/db/*
|
|
22
|
+
|
|
23
|
+
Style/StringLiterals:
|
|
24
|
+
EnforcedStyle: double_quotes
|
|
25
|
+
Style/StringLiteralsInInterpolation:
|
|
26
|
+
EnforcedStyle: double_quotes
|
|
27
|
+
|
|
28
|
+
Style/FrozenStringLiteralComment:
|
|
29
|
+
Enabled: true
|
|
30
|
+
|
|
31
|
+
Style/TrailingCommaInHashLiteral:
|
|
32
|
+
EnforcedStyleForMultiline: consistent_comma
|
|
33
|
+
Style/TrailingCommaInArrayLiteral:
|
|
34
|
+
EnforcedStyleForMultiline: consistent_comma
|
|
35
|
+
|
|
36
|
+
Style/SymbolArray:
|
|
37
|
+
MinSize: 3
|
|
38
|
+
Style/WordArray:
|
|
39
|
+
MinSize: 3
|
|
40
|
+
|
|
41
|
+
Style/ClassAndModuleChildren:
|
|
42
|
+
Exclude:
|
|
43
|
+
- spec/**/*
|
|
15
44
|
|
|
16
|
-
|
|
45
|
+
Layout/MultilineMethodCallIndentation:
|
|
46
|
+
EnforcedStyle: indented
|
|
47
|
+
Layout/TrailingBlankLines:
|
|
17
48
|
Enabled: true
|
|
49
|
+
Layout/DotPosition:
|
|
50
|
+
EnforcedStyle: leading
|
data/.travis.yml
CHANGED
|
@@ -1,24 +1,21 @@
|
|
|
1
|
-
cache: bundler
|
|
2
1
|
language: ruby
|
|
3
|
-
|
|
2
|
+
cache: bundler
|
|
4
3
|
|
|
5
4
|
rvm:
|
|
6
|
-
- 2.1
|
|
7
|
-
- 2.2
|
|
8
|
-
- 2.3
|
|
9
5
|
- 2.4
|
|
10
6
|
- 2.5
|
|
11
|
-
-
|
|
7
|
+
- 2.6
|
|
8
|
+
- ruby-head
|
|
12
9
|
|
|
13
|
-
before_install:
|
|
14
|
-
- gem update --system
|
|
15
|
-
- gem install bundler
|
|
10
|
+
#before_install:
|
|
11
|
+
# - gem update --system
|
|
12
|
+
# - gem install bundler
|
|
16
13
|
|
|
17
14
|
gemfile:
|
|
18
|
-
- gemfiles/rails_4_2.gemfile
|
|
19
15
|
- gemfiles/rails_5_0.gemfile
|
|
20
16
|
- gemfiles/rails_5_1.gemfile
|
|
21
17
|
- gemfiles/rails_5_2.gemfile
|
|
18
|
+
- gemfiles/rails_6_0.gemfile
|
|
22
19
|
- gemfiles/rails_master.gemfile
|
|
23
20
|
|
|
24
21
|
matrix:
|
|
@@ -29,17 +26,10 @@ matrix:
|
|
|
29
26
|
gemfile: gemfiles/rails_5_2.gemfile
|
|
30
27
|
script: bundle exec danger
|
|
31
28
|
exclude:
|
|
32
|
-
- gemfile: gemfiles/
|
|
33
|
-
rvm: 2.
|
|
34
|
-
- gemfile: gemfiles/rails_5_1.gemfile
|
|
35
|
-
rvm: 2.1
|
|
36
|
-
- gemfile: gemfiles/rails_5_2.gemfile
|
|
37
|
-
rvm: 2.1
|
|
38
|
-
- gemfile: gemfiles/rails_master.gemfile
|
|
39
|
-
rvm: 2.1
|
|
40
|
-
- gemfile: gemfiles/rails_master.gemfile
|
|
41
|
-
rvm: 2.2
|
|
29
|
+
- gemfile: gemfiles/rails_6_0.gemfile
|
|
30
|
+
rvm: 2.4
|
|
42
31
|
- gemfile: gemfiles/rails_master.gemfile
|
|
43
|
-
rvm: 2.
|
|
32
|
+
rvm: 2.4
|
|
44
33
|
allow_failures:
|
|
45
34
|
- gemfile: gemfiles/rails_master.gemfile
|
|
35
|
+
- rvm: ruby-head
|
data/Appraisals
CHANGED
|
@@ -1,18 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
gem "rails", "~> 4.2.0"
|
|
3
|
-
end
|
|
1
|
+
# frozen_string_literal: true
|
|
4
2
|
|
|
5
3
|
appraise "rails-5-0" do
|
|
6
4
|
gem "rails", "~> 5.0.0"
|
|
7
|
-
gem "
|
|
5
|
+
gem "sqlite3", "~> 1.3", "< 1.4", platform: %i[ruby mswin mingw x64_mingw]
|
|
8
6
|
end
|
|
9
7
|
|
|
10
8
|
appraise "rails-5-1" do
|
|
11
9
|
gem "rails", "~> 5.1.0"
|
|
12
|
-
gem "
|
|
10
|
+
gem "sqlite3", "~> 1.3", "< 1.4", platform: %i[ruby mswin mingw x64_mingw]
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
appraise "rails-5-2" do
|
|
14
|
+
gem "rails", "~> 5.2.0"
|
|
15
|
+
gem "sqlite3", "~> 1.3", "< 1.4", platform: %i[ruby mswin mingw x64_mingw]
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
appraise "rails-6-0" do
|
|
19
|
+
gem "rails", "~> 6.0.0.beta3"
|
|
20
|
+
gem "sqlite3", "~> 1.4", platform: %i[ruby mswin mingw x64_mingw]
|
|
21
|
+
|
|
22
|
+
# TODO: Remove when rspec-rails 4.0 released
|
|
23
|
+
gem "rspec-core", github: "rspec/rspec-core"
|
|
24
|
+
gem "rspec-expectations", github: "rspec/rspec-expectations"
|
|
25
|
+
gem "rspec-mocks", github: "rspec/rspec-mocks"
|
|
26
|
+
gem "rspec-rails", github: "rspec/rspec-rails", branch: "4-0-dev"
|
|
27
|
+
gem "rspec-support", github: "rspec/rspec-support"
|
|
13
28
|
end
|
|
14
29
|
|
|
15
30
|
appraise "rails-master" do
|
|
16
|
-
gem "rails", git:
|
|
17
|
-
gem "
|
|
31
|
+
gem "rails", git: "https://github.com/rails/rails"
|
|
32
|
+
gem "sqlite3", "~> 1.4", platform: %i[ruby mswin mingw x64_mingw]
|
|
33
|
+
|
|
34
|
+
# TODO: Remove when rspec-rails 4.0 released
|
|
35
|
+
gem "rspec-core", github: "rspec/rspec-core"
|
|
36
|
+
gem "rspec-expectations", github: "rspec/rspec-expectations"
|
|
37
|
+
gem "rspec-mocks", github: "rspec/rspec-mocks"
|
|
38
|
+
gem "rspec-rails", github: "rspec/rspec-rails", branch: "4-0-dev"
|
|
39
|
+
gem "rspec-support", github: "rspec/rspec-support"
|
|
18
40
|
end
|
data/Dangerfile
CHANGED
|
@@ -17,7 +17,7 @@ end
|
|
|
17
17
|
# --------------------------------------------------------------------------------------------------------------------
|
|
18
18
|
# Has any changes happened inside the actual library code?
|
|
19
19
|
# --------------------------------------------------------------------------------------------------------------------
|
|
20
|
-
has_app_changes = !git.modified_files.grep(/lib/).empty?
|
|
20
|
+
has_app_changes = !git.modified_files.grep(/lib|app/).empty?
|
|
21
21
|
has_spec_changes = !git.modified_files.grep(/spec/).empty?
|
|
22
22
|
|
|
23
23
|
# --------------------------------------------------------------------------------------------------------------------
|
|
@@ -52,7 +52,10 @@ Here's an example of a #{CHANGELOG_FILE} entry:
|
|
|
52
52
|
```
|
|
53
53
|
MARKDOWN
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
warn(
|
|
56
|
+
"Please include a changelog entry. \nYou can find it at [#{CHANGELOG_FILE}](#{GITHUB_REPO}/blob/master/#{CHANGELOG_FILE})." +
|
|
57
|
+
"You can skip this warning only if you made some typo fix or other small changes that didn't affect the API."
|
|
58
|
+
)
|
|
56
59
|
end
|
|
57
60
|
|
|
58
61
|
if git.commits.any? { |commit| commit.message =~ /^Merge branch '#{github.branch_for_base}'/ }
|
data/Gemfile
CHANGED
|
@@ -1,10 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
source "https://rubygems.org"
|
|
4
|
+
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
|
5
|
+
|
|
6
|
+
gemspec
|
|
7
|
+
|
|
8
|
+
gem "rails", "~> 6.0.0.beta3"
|
|
2
9
|
|
|
3
|
-
|
|
10
|
+
# TODO: Remove when rspec-rails 4.0 released
|
|
11
|
+
gem "rspec-core", github: "rspec/rspec-core"
|
|
12
|
+
gem "rspec-expectations", github: "rspec/rspec-expectations"
|
|
13
|
+
gem "rspec-mocks", github: "rspec/rspec-mocks"
|
|
14
|
+
gem "rspec-rails", github: "rspec/rspec-rails", branch: "4-0-dev"
|
|
15
|
+
gem "rspec-support", github: "rspec/rspec-support"
|
|
4
16
|
|
|
5
|
-
gem "
|
|
17
|
+
gem "rubocop", "~> 0.66"
|
|
18
|
+
|
|
19
|
+
gem "bcrypt", "~> 3.1", require: false
|
|
6
20
|
|
|
7
21
|
gem "activerecord-jdbcsqlite3-adapter", platform: :jruby
|
|
8
|
-
gem "sqlite3", platform: [
|
|
9
|
-
|
|
10
|
-
|
|
22
|
+
gem "sqlite3", "~> 1.4", platform: %i[ruby mswin mingw x64_mingw]
|
|
23
|
+
|
|
24
|
+
gem "tzinfo-data", platforms: %i[mingw mswin x64_mingw]
|
data/NEWS.md
CHANGED
|
@@ -5,10 +5,70 @@ upgrade guides.
|
|
|
5
5
|
|
|
6
6
|
User-visible changes worth mentioning.
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## master
|
|
9
9
|
|
|
10
|
-
[#
|
|
11
|
-
|
|
10
|
+
- [#PR] Add your PR description here.
|
|
11
|
+
|
|
12
|
+
## 5.1.0
|
|
13
|
+
|
|
14
|
+
- [#1243]: Add nil check operator in token checking at token introspection.
|
|
15
|
+
- [#1241] Explaining foreign key options for resource owner in a single place
|
|
16
|
+
- [#1237] Allow to set blank redirect URI if Doorkeeper configured to use redirect URI-less grant flows.
|
|
17
|
+
- [#1234] Fix `StaleRecordsCleaner` to properly work with big amount of records.
|
|
18
|
+
- [#1228] Allow to explicitly set non-expiring tokens in `custom_access_token_expires_in` configuration
|
|
19
|
+
option using `Float::INIFINITY` return value.
|
|
20
|
+
- [#1224] Do not try to store token if not found by fallback hashing strategy.
|
|
21
|
+
- [#1223] Update Hound/Rubocop rules, correct Doorkeeper codebase to follow style-guides.
|
|
22
|
+
- [#1220] Drop Rails 4.2 & Ruby < 2.4 support.
|
|
23
|
+
|
|
24
|
+
## 5.1.0.rc2
|
|
25
|
+
|
|
26
|
+
- [#1208] Unify hashing implementation into secret storing strategies
|
|
27
|
+
|
|
28
|
+
**[IMPORTANT]**: If you have been using the master branch of doorkeeper with bcrypt in your Gemfile.lock,
|
|
29
|
+
your application secrets have been hashed using BCrypt. To restore this behavior, use the initializer option
|
|
30
|
+
`use_application_hashing using: 'Doorkeeper::SecretStoring::BCrypt`.
|
|
31
|
+
|
|
32
|
+
- [#1216] Add nil check to `expires_at` method.
|
|
33
|
+
- [#1215] Fix deprecates for Rails 6.
|
|
34
|
+
- [#1214] Scopes field accepts array.
|
|
35
|
+
- [#1209] Fix tokens validation for Token Introspection request.
|
|
36
|
+
- [#1202] Use correct HTTP status codes for error responses.
|
|
37
|
+
|
|
38
|
+
**[IMPORTANT]**: this change might break your application if you were relying on the previous
|
|
39
|
+
401 status codes, this is now a 400 by default, or a 401 for `invalid_client` and `invalid_token` errors.
|
|
40
|
+
|
|
41
|
+
- [#1201] Fix custom TTL block `client` parameter to always be an `Doorkeeper::Application` instance.
|
|
42
|
+
|
|
43
|
+
**[IMPORTANT]**: those who defined `custom_access_token_expires_in` configuration option need to check
|
|
44
|
+
their block implementation: if you are using `oauth_client.application` to get `Doorkeeper::Application`
|
|
45
|
+
instance, then you need to replace it with just `oauth_client`.
|
|
46
|
+
|
|
47
|
+
- [#1200] Increase default Doorkeeper access token value complexity (`urlsafe_base64` instead of just `hex`)
|
|
48
|
+
matching RFC6749/RFC6750.
|
|
49
|
+
|
|
50
|
+
**[IMPORTANT]**: this change have possible side-effects in case you have custom database constraints for
|
|
51
|
+
access token value, application secrets, refresh tokens or you patched Doorkeeper models and introduced
|
|
52
|
+
token value validations, or you are using database with case-insensitive WHERE clause like MySQL
|
|
53
|
+
(you can face some collisions). Before this change access token value matched `[a-f0-9]` regex, and now
|
|
54
|
+
it matches `[a-zA-Z0-9\-_]`. In case you have such restrictions and your don't use custom token generator
|
|
55
|
+
please change configuration option `default_generator_method ` to `:hex`.
|
|
56
|
+
|
|
57
|
+
- [#1195] Allow to customize Token Introspection response (fixes #1194).
|
|
58
|
+
- [#1189] Option to set `token_reuse_limit`.
|
|
59
|
+
- [#1191] Try to load bcrypt for hashing of application secrets, but add fallback.
|
|
60
|
+
|
|
61
|
+
## 5.1.0.rc1
|
|
62
|
+
|
|
63
|
+
- [#1188] Use `params` instead of `request.POST` in tokens controller (fixes #1183).
|
|
64
|
+
- [#1182] Fix loopback IP redirect URIs to conform with RFC8252, p. 7.3 (fixes #1170).
|
|
65
|
+
- [#1179] Authorization Code Grant Flow without client id returns invalid_client error.
|
|
66
|
+
- [#1177] Allow to limit `scopes` for certain `grant_types`
|
|
67
|
+
- [#1176] Fix test factory support for `factory_bot_rails`
|
|
68
|
+
- [#1175] Internal refactor: use `scopes_string` inside `scopes`.
|
|
69
|
+
- [#1168] Allow optional hashing of tokens and secrets.
|
|
70
|
+
- [#1164] Fix error when `root_path` is not defined.
|
|
71
|
+
- [#1162] Fix `enforce_content_type` for requests without body.
|
|
12
72
|
|
|
13
73
|
## 5.0.2
|
|
14
74
|
|
|
@@ -17,13 +77,13 @@ User-visible changes worth mentioning.
|
|
|
17
77
|
|
|
18
78
|
## 5.0.1
|
|
19
79
|
|
|
80
|
+
- [#1154] Refactor `StaleRecordsCleaner` to be ORM agnostic.
|
|
81
|
+
- [#1152] Fix migration template: change resource owner data type from integer to Rails generic `references`
|
|
82
|
+
- [#1151] Fix Refresh Token strategy: add proper validation of client credentials both for Public & Private clients.
|
|
83
|
+
- [#1149] Fix for `URIChecker#valid_for_authorization?` false negative when query is blank, but `?` present.
|
|
20
84
|
- [#1140] Allow rendering custom errors from exceptions (issue #844). Originally opened as [#944].
|
|
21
85
|
- [#1138] Revert regression bug (check for token expiration in Authorizations controller so authorization
|
|
22
86
|
triggers every time)
|
|
23
|
-
- [#1149] Fix for `URIChecker#valid_for_authorization?` false negative when query is blank, but `?` present.
|
|
24
|
-
- [#1151] Fix Refresh Token strategy: add proper validation of client credentials both for Public & Private clients.
|
|
25
|
-
- [#1152] Fix migration template: change resource owner data type from integer to Rails generic `references`
|
|
26
|
-
- [#1154] Refactor `StaleRecordsCleaner` to be ORM agnostic.
|
|
27
87
|
|
|
28
88
|
## 5.0.0
|
|
29
89
|
|
|
@@ -31,14 +91,14 @@ User-visible changes worth mentioning.
|
|
|
31
91
|
|
|
32
92
|
## 5.0.0.rc2
|
|
33
93
|
|
|
34
|
-
- [#
|
|
35
|
-
|
|
36
|
-
- [#1108] Simple formating of callback URLs when listing oauth applications
|
|
94
|
+
- [#1122] Fix AuthorizationsController#new error response to be in JSON format
|
|
95
|
+
- [#1119] Fix token revocation for OAuth apps using "implicit" grant flow
|
|
37
96
|
- [#1116] `AccessGrant`s will now be revoked along with `AccessToken`s when
|
|
38
97
|
hitting the `AuthorizedApplicationController#destroy` route.
|
|
39
98
|
- [#1114] Make token info endpoint's attributes consistent with token creation
|
|
40
|
-
- [#
|
|
41
|
-
- [#
|
|
99
|
+
- [#1108] Simple formating of callback URLs when listing oauth applications
|
|
100
|
+
- [#1106] Restrict access to AdminController with 'Forbidden 403' if admin_authenticator is not
|
|
101
|
+
configured by developers.
|
|
42
102
|
|
|
43
103
|
## 5.0.0.rc1
|
|
44
104
|
|
|
@@ -59,12 +119,12 @@ User-visible changes worth mentioning.
|
|
|
59
119
|
`Doorkeeper#installed?` method
|
|
60
120
|
- [#1031] Allow public clients to authenticate without `client_secret`. Define an app as
|
|
61
121
|
either public or private/confidential
|
|
62
|
-
|
|
122
|
+
|
|
63
123
|
**[IMPORTANT]**: all the applications (clients) now are considered as private by default.
|
|
64
124
|
You need to manually change `confidential` column to `false` if you are using public clients,
|
|
65
125
|
in other case your mobile (or other) applications will not be able to authorize.
|
|
66
126
|
See [#1142](https://github.com/doorkeeper-gem/doorkeeper/issues/1142) for more details.
|
|
67
|
-
|
|
127
|
+
|
|
68
128
|
- [#1010] Add configuration to enforce configured scopes (`default_scopes` and
|
|
69
129
|
`optional_scopes`) for applications
|
|
70
130
|
- [#1060] Ensure that the native redirect_uri parameter matches with redirect_uri of the client
|
|
@@ -82,26 +142,26 @@ User-visible changes worth mentioning.
|
|
|
82
142
|
- [#1076] Add config to enforce content type to application/x-www-form-urlencoded
|
|
83
143
|
- Fix bug with `force_ssl_in_redirect_uri` when it breaks existing applications with an
|
|
84
144
|
SSL redirect_uri.
|
|
85
|
-
|
|
145
|
+
|
|
86
146
|
## 4.4.3
|
|
87
|
-
|
|
147
|
+
|
|
88
148
|
- [#1143] Adds a config option `opt_out_native_route_change` to opt out of the breaking api
|
|
89
149
|
changed introduced in https://github.com/doorkeeper-gem/doorkeeper/pull/1003
|
|
90
150
|
|
|
91
|
-
|
|
151
|
+
|
|
92
152
|
## 4.4.2
|
|
93
153
|
|
|
94
154
|
- [#1130] Backport fix for native redirect_uri from 5.x.
|
|
95
|
-
|
|
155
|
+
|
|
96
156
|
## 4.4.1
|
|
97
157
|
|
|
98
158
|
- [#1127] Backport token type to comply with the RFC6750 specification.
|
|
99
159
|
- [#1125] Backport Quote surround I18n yes/no keys
|
|
100
|
-
|
|
160
|
+
|
|
101
161
|
## 4.4.0
|
|
102
|
-
|
|
162
|
+
|
|
103
163
|
- [#1120] Backport security fix from 5.x for token revocation when using public clients
|
|
104
|
-
|
|
164
|
+
|
|
105
165
|
**[IMPORTANT]**: all the applications (clients) now are considered as private by default.
|
|
106
166
|
You need to manually change `confidential` column to `false` if you are using public clients,
|
|
107
167
|
in other case your mobile (or other) applications will not be able to authorize.
|