doorkeeper 5.4.0 → 5.5.2

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.

Potentially problematic release.


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

Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +71 -10
  3. data/README.md +10 -4
  4. data/app/controllers/doorkeeper/application_controller.rb +1 -0
  5. data/app/controllers/doorkeeper/authorizations_controller.rb +16 -5
  6. data/app/controllers/doorkeeper/authorized_applications_controller.rb +1 -1
  7. data/app/controllers/doorkeeper/token_info_controller.rb +12 -2
  8. data/app/controllers/doorkeeper/tokens_controller.rb +34 -26
  9. data/app/views/doorkeeper/applications/show.html.erb +16 -12
  10. data/app/views/doorkeeper/authorizations/form_post.html.erb +15 -0
  11. data/app/views/doorkeeper/authorizations/new.html.erb +2 -0
  12. data/config/locales/en.yml +3 -1
  13. data/lib/doorkeeper.rb +5 -0
  14. data/lib/doorkeeper/config.rb +92 -63
  15. data/lib/doorkeeper/config/option.rb +1 -3
  16. data/lib/doorkeeper/config/validations.rb +53 -0
  17. data/lib/doorkeeper/grant_flow.rb +45 -0
  18. data/lib/doorkeeper/grant_flow/fallback_flow.rb +15 -0
  19. data/lib/doorkeeper/grant_flow/flow.rb +44 -0
  20. data/lib/doorkeeper/grant_flow/registry.rb +50 -0
  21. data/lib/doorkeeper/helpers/controller.rb +4 -0
  22. data/lib/doorkeeper/models/access_grant_mixin.rb +1 -2
  23. data/lib/doorkeeper/models/access_token_mixin.rb +4 -4
  24. data/lib/doorkeeper/models/concerns/expirable.rb +1 -1
  25. data/lib/doorkeeper/models/concerns/revocable.rb +1 -1
  26. data/lib/doorkeeper/oauth/authorization/code.rb +4 -0
  27. data/lib/doorkeeper/oauth/authorization/context.rb +5 -5
  28. data/lib/doorkeeper/oauth/authorization/token.rb +10 -4
  29. data/lib/doorkeeper/oauth/authorization/uri_builder.rb +1 -1
  30. data/lib/doorkeeper/oauth/authorization_code_request.rb +10 -17
  31. data/lib/doorkeeper/oauth/base_request.rb +1 -1
  32. data/lib/doorkeeper/oauth/client_credentials/creator.rb +2 -1
  33. data/lib/doorkeeper/oauth/client_credentials/issuer.rb +1 -0
  34. data/lib/doorkeeper/oauth/code_request.rb +1 -1
  35. data/lib/doorkeeper/oauth/code_response.rb +17 -11
  36. data/lib/doorkeeper/oauth/error_response.rb +4 -3
  37. data/lib/doorkeeper/oauth/helpers/scope_checker.rb +1 -3
  38. data/lib/doorkeeper/oauth/helpers/uri_checker.rb +0 -18
  39. data/lib/doorkeeper/oauth/password_access_token_request.rb +23 -3
  40. data/lib/doorkeeper/oauth/pre_authorization.rb +33 -8
  41. data/lib/doorkeeper/oauth/refresh_token_request.rb +13 -0
  42. data/lib/doorkeeper/orm/active_record.rb +5 -14
  43. data/lib/doorkeeper/orm/active_record/mixins/access_grant.rb +11 -1
  44. data/lib/doorkeeper/orm/active_record/mixins/access_token.rb +9 -1
  45. data/lib/doorkeeper/orm/active_record/mixins/application.rb +15 -4
  46. data/lib/doorkeeper/orm/active_record/redirect_uri_validator.rb +5 -0
  47. data/lib/doorkeeper/rails/routes.rb +1 -3
  48. data/lib/doorkeeper/rake/db.rake +3 -3
  49. data/lib/doorkeeper/rake/setup.rake +5 -0
  50. data/lib/doorkeeper/request.rb +49 -12
  51. data/lib/doorkeeper/request/password.rb +1 -0
  52. data/lib/doorkeeper/version.rb +2 -6
  53. data/lib/generators/doorkeeper/templates/add_owner_to_application_migration.rb.erb +1 -1
  54. data/lib/generators/doorkeeper/templates/initializer.rb +10 -8
  55. metadata +23 -10
@@ -62,6 +62,19 @@ module Doorkeeper
62
62
  attributes[:previous_refresh_token] = refresh_token.refresh_token
63
63
  end
64
64
 
65
+ # RFC6749
66
+ # 1.5. Refresh Token
67
+ #
68
+ # Refresh tokens are issued to the client by the authorization server and are
69
+ # used to obtain a new access token when the current access token
70
+ # becomes invalid or expires, or to obtain additional access tokens
71
+ # with identical or narrower scope (access tokens may have a shorter
72
+ # lifetime and fewer permissions than authorized by the resource
73
+ # owner).
74
+ #
75
+ # Here we assume that TTL of the token received after refreshing should be
76
+ # the same as that of the original token.
77
+ #
65
78
  @access_token = server_config.access_token_model.create_for(
66
79
  application: refresh_token.application,
67
80
  resource_owner: resource_owner,
@@ -20,9 +20,8 @@ module Doorkeeper
20
20
  require "doorkeeper/orm/active_record/access_token"
21
21
  require "doorkeeper/orm/active_record/application"
22
22
 
23
- if Doorkeeper.config.active_record_options[:establish_connection]
23
+ if (options = Doorkeeper.config.active_record_options[:establish_connection])
24
24
  Doorkeeper::Orm::ActiveRecord.models.each do |model|
25
- options = Doorkeeper.config.active_record_options[:establish_connection]
26
25
  model.establish_connection(options)
27
26
  end
28
27
  end
@@ -38,22 +37,14 @@ module Doorkeeper
38
37
  end
39
38
 
40
39
  def self.lazy_load(&block)
41
- # ActiveSupport has no public interface to check if something
42
- # already lazy-loaded :(
43
- loaded = ActiveSupport.instance_variable_get(:"@loaded") || {}
44
-
45
- if loaded.key?(:active_record)
46
- block.call
47
- else
48
- ActiveSupport.on_load(:active_record, {}, &block)
49
- end
40
+ ActiveSupport.on_load(:active_record, {}, &block)
50
41
  end
51
42
 
52
43
  def self.models
53
44
  [
54
- Doorkeeper::AccessGrant,
55
- Doorkeeper::AccessToken,
56
- Doorkeeper::Application,
45
+ Doorkeeper.config.access_grant_model,
46
+ Doorkeeper.config.access_token_model,
47
+ Doorkeeper.config.application_model,
57
48
  ]
58
49
  end
59
50
  end
@@ -5,7 +5,7 @@ module Doorkeeper::Orm::ActiveRecord::Mixins
5
5
  extend ActiveSupport::Concern
6
6
 
7
7
  included do
8
- self.table_name = "#{table_name_prefix}oauth_access_grants#{table_name_suffix}"
8
+ self.table_name = compute_doorkeeper_table_name
9
9
 
10
10
  include ::Doorkeeper::AccessGrantMixin
11
11
 
@@ -54,5 +54,15 @@ module Doorkeeper::Orm::ActiveRecord::Mixins
54
54
  secret_strategy.store_secret(self, :token, @raw_token)
55
55
  end
56
56
  end
57
+
58
+ module ClassMethods
59
+ private
60
+
61
+ def compute_doorkeeper_table_name
62
+ table_name = "oauth_access_grant"
63
+ table_name = table_name.pluralize if pluralize_table_names
64
+ "#{table_name_prefix}#{table_name}#{table_name_suffix}"
65
+ end
66
+ end
57
67
  end
58
68
  end
@@ -5,7 +5,7 @@ module Doorkeeper::Orm::ActiveRecord::Mixins
5
5
  extend ActiveSupport::Concern
6
6
 
7
7
  included do
8
- self.table_name = "#{table_name_prefix}oauth_access_tokens#{table_name_suffix}"
8
+ self.table_name = compute_doorkeeper_table_name
9
9
 
10
10
  include ::Doorkeeper::AccessTokenMixin
11
11
 
@@ -46,6 +46,14 @@ module Doorkeeper::Orm::ActiveRecord::Mixins
46
46
  def refresh_token_revoked_on_use?
47
47
  column_names.include?("previous_refresh_token")
48
48
  end
49
+
50
+ private
51
+
52
+ def compute_doorkeeper_table_name
53
+ table_name = "oauth_access_token"
54
+ table_name = table_name.pluralize if pluralize_table_names
55
+ "#{table_name_prefix}#{table_name}#{table_name_suffix}"
56
+ end
49
57
  end
50
58
  end
51
59
  end
@@ -5,7 +5,7 @@ module Doorkeeper::Orm::ActiveRecord::Mixins
5
5
  extend ActiveSupport::Concern
6
6
 
7
7
  included do
8
- self.table_name = "#{table_name_prefix}oauth_applications#{table_name_suffix}"
8
+ self.table_name = compute_doorkeeper_table_name
9
9
 
10
10
  include ::Doorkeeper::ApplicationMixin
11
11
 
@@ -137,9 +137,9 @@ module Doorkeeper::Orm::ActiveRecord::Mixins
137
137
  only = Array.wrap(opts[:only]).map(&:to_s)
138
138
 
139
139
  only = if only.blank?
140
- serializable_attributes
140
+ client_serializable_attributes
141
141
  else
142
- only & serializable_attributes
142
+ only & client_serializable_attributes
143
143
  end
144
144
 
145
145
  only -= Array.wrap(opts[:except]).map(&:to_s) if opts.key?(:except)
@@ -150,7 +150,10 @@ module Doorkeeper::Orm::ActiveRecord::Mixins
150
150
  # Override this method if you need additional attributes to be serialized.
151
151
  #
152
152
  # @return [Array<String>] collection of serializable attributes
153
- def serializable_attributes
153
+ #
154
+ # NOTE: `serializable_attributes` method already taken by Rails >= 6
155
+ #
156
+ def client_serializable_attributes
154
157
  attributes = %w[id name created_at]
155
158
  attributes << "uid" unless confidential?
156
159
  attributes
@@ -182,6 +185,14 @@ module Doorkeeper::Orm::ActiveRecord::Mixins
182
185
  Doorkeeper.config.access_token_model.revoke_all_for(id, resource_owner)
183
186
  Doorkeeper.config.access_grant_model.revoke_all_for(id, resource_owner)
184
187
  end
188
+
189
+ private
190
+
191
+ def compute_doorkeeper_table_name
192
+ table_name = "oauth_application"
193
+ table_name = table_name.pluralize if pluralize_table_names
194
+ "#{table_name_prefix}#{table_name}#{table_name_suffix}"
195
+ end
185
196
  end
186
197
  end
187
198
  end
@@ -21,6 +21,7 @@ module Doorkeeper
21
21
  record.errors.add(attribute, :unspecified_scheme) if unspecified_scheme?(uri)
22
22
  record.errors.add(attribute, :relative_uri) if relative_uri?(uri)
23
23
  record.errors.add(attribute, :secured_uri) if invalid_ssl_uri?(uri)
24
+ record.errors.add(attribute, :invalid_uri) if unspecified_host?(uri)
24
25
  end
25
26
  end
26
27
  rescue URI::InvalidURIError
@@ -43,6 +44,10 @@ module Doorkeeper
43
44
  %w[localhost].include?(uri.try(:scheme))
44
45
  end
45
46
 
47
+ def unspecified_host?(uri)
48
+ uri.is_a?(URI::HTTP) && uri.host.nil?
49
+ end
50
+
46
51
  def relative_uri?(uri)
47
52
  uri.scheme.nil? && uri.host.nil?
48
53
  end
@@ -29,8 +29,6 @@ module Doorkeeper
29
29
 
30
30
  def initialize(routes, mapper = Mapper.new, &block)
31
31
  super
32
-
33
- @mapping.skips.push(:applications, :authorized_applications) if Doorkeeper.config.api_only
34
32
  end
35
33
 
36
34
  def generate_routes!(options)
@@ -38,7 +36,7 @@ module Doorkeeper
38
36
  map_route(:authorizations, :authorization_routes)
39
37
  map_route(:tokens, :token_routes)
40
38
  map_route(:tokens, :revoke_routes)
41
- map_route(:tokens, :introspect_routes)
39
+ map_route(:tokens, :introspect_routes) unless Doorkeeper.config.allow_token_introspection.is_a?(FalseClass)
42
40
  map_route(:applications, :application_routes)
43
41
  map_route(:authorized_applications, :authorized_applications_routes)
44
42
  map_route(:token_info, :token_info_routes)
@@ -13,7 +13,7 @@ namespace :doorkeeper do
13
13
  namespace :cleanup do
14
14
  desc "Removes stale access tokens"
15
15
  task revoked_tokens: "doorkeeper:setup" do
16
- cleaner = Doorkeeper::StaleRecordsCleaner.new(Doorkeeper::AccessToken)
16
+ cleaner = Doorkeeper::StaleRecordsCleaner.new(Doorkeeper.config.access_token_model)
17
17
  cleaner.clean_revoked
18
18
  end
19
19
 
@@ -26,13 +26,13 @@ namespace :doorkeeper do
26
26
 
27
27
  desc "Removes stale access grants"
28
28
  task revoked_grants: "doorkeeper:setup" do
29
- cleaner = Doorkeeper::StaleRecordsCleaner.new(Doorkeeper::AccessGrant)
29
+ cleaner = Doorkeeper::StaleRecordsCleaner.new(Doorkeeper.config.access_grant_model)
30
30
  cleaner.clean_revoked
31
31
  end
32
32
 
33
33
  desc "Removes expired (TTL passed) access grants"
34
34
  task expired_grants: "doorkeeper:setup" do
35
- cleaner = Doorkeeper::StaleRecordsCleaner.new(Doorkeeper::AccessGrant)
35
+ cleaner = Doorkeeper::StaleRecordsCleaner.new(Doorkeeper.config.access_grant_model)
36
36
  cleaner.clean_expired(Doorkeeper.config.authorization_code_expires_in)
37
37
  end
38
38
  end
@@ -2,5 +2,10 @@
2
2
 
3
3
  namespace :doorkeeper do
4
4
  task setup: :environment do
5
+ # Dirty hack to manually initialize AR because of lazy auto-loading,
6
+ # in other case we'll see NameError: uninitialized constant Doorkeeper::AccessToken
7
+ if Doorkeeper.config.orm == :active_record && defined?(::ActiveRecord::Base)
8
+ Object.const_get("::ActiveRecord::Base")
9
+ end
5
10
  end
6
11
  end
@@ -4,32 +4,69 @@ module Doorkeeper
4
4
  module Request
5
5
  class << self
6
6
  def authorization_strategy(response_type)
7
- build_strategy_class(response_type)
7
+ grant_flow = authorization_flows.detect do |flow|
8
+ flow.matches_response_type?(response_type)
9
+ end
10
+
11
+ if grant_flow
12
+ grant_flow.response_type_strategy
13
+ else
14
+ # [NOTE]: this will be removed in a newer versions of Doorkeeper.
15
+ # For retro-compatibility only
16
+ build_fallback_strategy_class(response_type)
17
+ end
8
18
  end
9
19
 
10
20
  def token_strategy(grant_type)
11
21
  raise Errors::MissingRequiredParameter, :grant_type if grant_type.blank?
12
22
 
13
- get_strategy(grant_type, token_grant_types)
14
- rescue NameError
15
- raise Errors::InvalidTokenStrategy
16
- end
23
+ grant_flow = token_flows.detect do |flow|
24
+ flow.matches_grant_type?(grant_type)
25
+ end
17
26
 
18
- def get_strategy(grant_type, available)
19
- raise NameError unless available.include?(grant_type.to_s)
27
+ if grant_flow
28
+ grant_flow.grant_type_strategy
29
+ else
30
+ # [NOTE]: this will be removed in a newer versions of Doorkeeper.
31
+ # For retro-compatibility only
32
+ raise Errors::InvalidTokenStrategy unless available.include?(grant_type.to_s)
20
33
 
21
- build_strategy_class(grant_type)
34
+ strategy_class = build_fallback_strategy_class(grant_type)
35
+ raise Errors::InvalidTokenStrategy unless strategy_class
36
+
37
+ strategy_class
38
+ end
22
39
  end
23
40
 
24
41
  private
25
42
 
26
- def token_grant_types
27
- Doorkeeper.config.token_grant_types
43
+ def authorization_flows
44
+ Doorkeeper.configuration.authorization_response_flows
45
+ end
46
+
47
+ def token_flows
48
+ Doorkeeper.configuration.token_grant_flows
28
49
  end
29
50
 
30
- def build_strategy_class(grant_or_request_type)
51
+ # [NOTE]: this will be removed in a newer versions of Doorkeeper.
52
+ # For retro-compatibility only
53
+ def available
54
+ Doorkeeper.config.deprecated_token_grant_types_resolver
55
+ end
56
+
57
+ def build_fallback_strategy_class(grant_or_request_type)
31
58
  strategy_class_name = grant_or_request_type.to_s.tr(" ", "_").camelize
32
- "Doorkeeper::Request::#{strategy_class_name}".constantize
59
+ fallback_strategy = "Doorkeeper::Request::#{strategy_class_name}".constantize
60
+
61
+ ::Kernel.warn <<~WARNING
62
+ [DOORKEEPER] #{fallback_strategy} found using fallback, it must be
63
+ registered using `Doorkeeper::GrantFlow.register(grant_flow_name, **options)`.
64
+ This functionality will be removed in a newer versions of Doorkeeper.
65
+ WARNING
66
+
67
+ fallback_strategy
68
+ rescue NameError
69
+ raise Errors::InvalidTokenStrategy
33
70
  end
34
71
  end
35
72
  end
@@ -9,6 +9,7 @@ module Doorkeeper
9
9
  @request ||= OAuth::PasswordAccessTokenRequest.new(
10
10
  Doorkeeper.config,
11
11
  client,
12
+ credentials,
12
13
  resource_owner,
13
14
  parameters,
14
15
  )
@@ -1,15 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Doorkeeper
4
- def self.gem_version
5
- Gem::Version.new VERSION::STRING
6
- end
7
-
8
4
  module VERSION
9
5
  # Semantic versioning
10
6
  MAJOR = 5
11
- MINOR = 4
12
- TINY = 0
7
+ MINOR = 5
8
+ TINY = 2
13
9
  PRE = nil
14
10
 
15
11
  # Full version number
@@ -2,7 +2,7 @@
2
2
 
3
3
  class AddOwnerToApplication < ActiveRecord::Migration<%= migration_version %>
4
4
  def change
5
- add_column :oauth_applications, :owner_id, :integer, null: true
5
+ add_column :oauth_applications, :owner_id, :bigint, null: true
6
6
  add_column :oauth_applications, :owner_type, :string, null: true
7
7
  add_index :oauth_applications, [:owner_id, :owner_type]
8
8
  end
@@ -103,12 +103,13 @@ Doorkeeper.configure do
103
103
  #
104
104
  # `context` has the following properties available:
105
105
  #
106
- # `client` - the OAuth client application (see Doorkeeper::OAuth::Client)
107
- # `grant_type` - the grant type of the request (see Doorkeeper::OAuth)
108
- # `scopes` - the requested scopes (see Doorkeeper::OAuth::Scopes)
106
+ # * `client` - the OAuth client application (see Doorkeeper::OAuth::Client)
107
+ # * `grant_type` - the grant type of the request (see Doorkeeper::OAuth)
108
+ # * `scopes` - the requested scopes (see Doorkeeper::OAuth::Scopes)
109
+ # * `resource_owner` - authorized resource owner instance (if present)
109
110
  #
110
111
  # custom_access_token_expires_in do |context|
111
- # context.client.application.additional_settings.implicit_oauth_expiration
112
+ # context.client.additional_settings.implicit_oauth_expiration
112
113
  # end
113
114
 
114
115
  # Use a custom class for generating the access token.
@@ -119,7 +120,7 @@ Doorkeeper.configure do
119
120
  # The controller +Doorkeeper::ApplicationController+ inherits from.
120
121
  # Defaults to +ActionController::Base+ unless +api_only+ is set, which changes the default to
121
122
  # +ActionController::API+. The return value of this option must be a stringified class name.
122
- # See https://doorkeeper.gitbook.io/guides/configuration/other-configurations#custom-base-controller
123
+ # See https://doorkeeper.gitbook.io/guides/configuration/other-configurations#custom-controllers
123
124
  #
124
125
  # base_controller 'ApplicationController'
125
126
 
@@ -167,8 +168,7 @@ Doorkeeper.configure do
167
168
  # since plain values can no longer be retrieved.
168
169
  #
169
170
  # Note: If you are already a user of doorkeeper and have existing tokens
170
- # in your installation, they will be invalid without enabling the additional
171
- # setting `fallback_to_plain_secrets` below.
171
+ # in your installation, they will be invalid without adding 'fallback: :plain'.
172
172
  #
173
173
  # hash_token_secrets
174
174
  # By default, token secrets will be hashed using the
@@ -202,7 +202,9 @@ Doorkeeper.configure do
202
202
  # This will ensure that old access tokens and secrets
203
203
  # will remain valid even if the hashing above is enabled.
204
204
  #
205
- # fallback_to_plain_secrets
205
+ # This can be done by adding 'fallback: plain', e.g. :
206
+ #
207
+ # hash_application_secrets using: '::Doorkeeper::SecretStoring::BCrypt', fallback: :plain
206
208
 
207
209
  # Issue access tokens with refresh token (disabled by default), you may also
208
210
  # pass a block which accepts `context` to customize when to give a refresh
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: 5.4.0
4
+ version: 5.5.2
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: 2020-05-11 00:00:00.000000000 Z
14
+ date: 2021-06-11 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: railties
@@ -89,28 +89,28 @@ dependencies:
89
89
  requirements:
90
90
  - - "~>"
91
91
  - !ruby/object:Gem::Version
92
- version: '1.6'
92
+ version: '2.0'
93
93
  type: :development
94
94
  prerelease: false
95
95
  version_requirements: !ruby/object:Gem::Requirement
96
96
  requirements:
97
97
  - - "~>"
98
98
  - !ruby/object:Gem::Version
99
- version: '1.6'
99
+ version: '2.0'
100
100
  - !ruby/object:Gem::Dependency
101
101
  name: factory_bot
102
102
  requirement: !ruby/object:Gem::Requirement
103
103
  requirements:
104
104
  - - "~>"
105
105
  - !ruby/object:Gem::Version
106
- version: '5.0'
106
+ version: '6.0'
107
107
  type: :development
108
108
  prerelease: false
109
109
  version_requirements: !ruby/object:Gem::Requirement
110
110
  requirements:
111
111
  - - "~>"
112
112
  - !ruby/object:Gem::Version
113
- version: '5.0'
113
+ version: '6.0'
114
114
  - !ruby/object:Gem::Dependency
115
115
  name: generator_spec
116
116
  requirement: !ruby/object:Gem::Requirement
@@ -194,6 +194,7 @@ files:
194
194
  - app/views/doorkeeper/applications/new.html.erb
195
195
  - app/views/doorkeeper/applications/show.html.erb
196
196
  - app/views/doorkeeper/authorizations/error.html.erb
197
+ - app/views/doorkeeper/authorizations/form_post.html.erb
197
198
  - app/views/doorkeeper/authorizations/new.html.erb
198
199
  - app/views/doorkeeper/authorizations/show.html.erb
199
200
  - app/views/doorkeeper/authorized_applications/_delete_form.html.erb
@@ -205,8 +206,13 @@ files:
205
206
  - lib/doorkeeper/config.rb
206
207
  - lib/doorkeeper/config/abstract_builder.rb
207
208
  - lib/doorkeeper/config/option.rb
209
+ - lib/doorkeeper/config/validations.rb
208
210
  - lib/doorkeeper/engine.rb
209
211
  - lib/doorkeeper/errors.rb
212
+ - lib/doorkeeper/grant_flow.rb
213
+ - lib/doorkeeper/grant_flow/fallback_flow.rb
214
+ - lib/doorkeeper/grant_flow/flow.rb
215
+ - lib/doorkeeper/grant_flow/registry.rb
210
216
  - lib/doorkeeper/grape/authorization_decorator.rb
211
217
  - lib/doorkeeper/grape/helpers.rb
212
218
  - lib/doorkeeper/helpers/controller.rb
@@ -312,11 +318,18 @@ licenses:
312
318
  - MIT
313
319
  metadata:
314
320
  homepage_uri: https://github.com/doorkeeper-gem/doorkeeper
315
- changelog_uri: https://github.com/doorkeeper-gem/doorkeeper/blob/master/CHANGELOG.md
321
+ changelog_uri: https://github.com/doorkeeper-gem/doorkeeper/blob/main/CHANGELOG.md
316
322
  source_code_uri: https://github.com/doorkeeper-gem/doorkeeper
317
323
  bug_tracker_uri: https://github.com/doorkeeper-gem/doorkeeper/issues
318
324
  documentation_uri: https://doorkeeper.gitbook.io/guides/
319
- post_install_message:
325
+ post_install_message: "Starting from 5.5.0 RC1 Doorkeeper requires client authentication
326
+ for Resource Owner Password Grant\nas stated in the OAuth RFC. You have to create
327
+ a new OAuth client (Doorkeeper::Application) if you didn't\nhave it before and use
328
+ client credentials in HTTP Basic auth if you previously used this grant flow without\nclient
329
+ authentication. \n\nTo opt out of this you could set the \"skip_client_authentication_for_password_grant\"
330
+ configuration option\nto \"true\", but note that this is in violation of the OAuth
331
+ spec and represents a security risk.\n\nRead https://github.com/doorkeeper-gem/doorkeeper/issues/561#issuecomment-612857163
332
+ for more details."
320
333
  rdoc_options: []
321
334
  require_paths:
322
335
  - lib
@@ -324,14 +337,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
324
337
  requirements:
325
338
  - - ">="
326
339
  - !ruby/object:Gem::Version
327
- version: '2.4'
340
+ version: '2.5'
328
341
  required_rubygems_version: !ruby/object:Gem::Requirement
329
342
  requirements:
330
343
  - - ">="
331
344
  - !ruby/object:Gem::Version
332
345
  version: '0'
333
346
  requirements: []
334
- rubygems_version: 3.0.2
347
+ rubygems_version: 3.1.2
335
348
  signing_key:
336
349
  specification_version: 4
337
350
  summary: OAuth 2 provider for Rails and Grape