doorkeeper-openid_connect 1.7.1 → 1.8.0.pre.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +45 -0
  3. data/README.md +40 -0
  4. data/app/controllers/doorkeeper/authorizations_controller.rb +1 -1
  5. data/app/controllers/doorkeeper/openid_connect/discovery_controller.rb +52 -26
  6. data/app/controllers/doorkeeper/openid_connect/userinfo_controller.rb +5 -1
  7. data/config/locales/en.yml +1 -0
  8. data/lib/doorkeeper/oauth/id_token_request.rb +7 -1
  9. data/lib/doorkeeper/oauth/id_token_response.rb +7 -7
  10. data/lib/doorkeeper/oauth/id_token_token_request.rb +2 -0
  11. data/lib/doorkeeper/oauth/id_token_token_response.rb +3 -3
  12. data/lib/doorkeeper/openid_connect.rb +21 -2
  13. data/lib/doorkeeper/openid_connect/claims/aggregated_claim.rb +2 -0
  14. data/lib/doorkeeper/openid_connect/claims/claim.rb +6 -4
  15. data/lib/doorkeeper/openid_connect/claims/distributed_claim.rb +2 -0
  16. data/lib/doorkeeper/openid_connect/claims/normal_claim.rb +2 -0
  17. data/lib/doorkeeper/openid_connect/claims_builder.rb +3 -1
  18. data/lib/doorkeeper/openid_connect/config.rb +24 -10
  19. data/lib/doorkeeper/openid_connect/engine.rb +2 -0
  20. data/lib/doorkeeper/openid_connect/errors.rb +2 -1
  21. data/lib/doorkeeper/openid_connect/helpers/controller.rb +52 -26
  22. data/lib/doorkeeper/openid_connect/id_token.rb +8 -2
  23. data/lib/doorkeeper/openid_connect/id_token_token.rb +2 -0
  24. data/lib/doorkeeper/openid_connect/oauth/authorization/code.rb +25 -8
  25. data/lib/doorkeeper/openid_connect/oauth/authorization_code_request.rb +4 -2
  26. data/lib/doorkeeper/openid_connect/oauth/password_access_token_request.rb +3 -1
  27. data/lib/doorkeeper/openid_connect/oauth/pre_authorization.rb +12 -14
  28. data/lib/doorkeeper/openid_connect/oauth/token_response.rb +3 -1
  29. data/lib/doorkeeper/openid_connect/orm/active_record.rb +2 -0
  30. data/lib/doorkeeper/openid_connect/orm/active_record/access_grant.rb +3 -1
  31. data/lib/doorkeeper/openid_connect/orm/active_record/request.rb +5 -3
  32. data/lib/doorkeeper/openid_connect/rails/routes.rb +3 -1
  33. data/lib/doorkeeper/openid_connect/rails/routes/mapper.rb +2 -0
  34. data/lib/doorkeeper/openid_connect/rails/routes/mapping.rb +2 -0
  35. data/lib/doorkeeper/openid_connect/user_info.rb +2 -0
  36. data/lib/doorkeeper/openid_connect/version.rb +3 -1
  37. data/lib/doorkeeper/request/id_token.rb +2 -0
  38. data/lib/doorkeeper/request/id_token_token.rb +2 -0
  39. data/lib/generators/doorkeeper/openid_connect/install_generator.rb +4 -2
  40. data/lib/generators/doorkeeper/openid_connect/migration_generator.rb +3 -1
  41. data/lib/generators/doorkeeper/openid_connect/templates/initializer.rb +22 -6
  42. data/lib/generators/doorkeeper/openid_connect/templates/migration.rb.erb +1 -1
  43. metadata +26 -36
  44. data/.gitignore +0 -8
  45. data/.ruby-version +0 -1
  46. data/.travis.yml +0 -27
  47. data/CONTRIBUTING.md +0 -45
  48. data/Gemfile +0 -8
  49. data/Rakefile +0 -24
  50. data/bin/console +0 -9
  51. data/bin/setup +0 -8
  52. data/doorkeeper-openid_connect.gemspec +0 -32
  53. data/lib/doorkeeper/openid_connect/response_types_config.rb +0 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0bcb761a45b80b603b387474f5393d9000d154468eb7974620e9aace796836c5
4
- data.tar.gz: 51809691b1ea73f5f2a28f00c2aa105c821e9e4326ae781b4dcbb433c7e034ac
3
+ metadata.gz: 1f78f5dd79c5979e4c8e4ba7e24524f9b6fbe412944e353c1ce3e1b11eaf6479
4
+ data.tar.gz: 86801e079f717fe9723018c0ac7a5eae02a6a2cc867ff855bb73f1d75bc5ac8f
5
5
  SHA512:
6
- metadata.gz: d6e3df930e4e466ffac74df7d3e237158a34a7a831f6003749a9edf8766b762db132430c862287bd16a21a66d035cb4b62fa7f8f0f518452cf8bab3ec1fd4709
7
- data.tar.gz: 32721653701e09ae2d022c627bf13f2bfce5390ffad046d976c880b186c97eaec5fa9173aed21789141056322786604224bfe62e6bfe4cdb43da030ed08b2b50
6
+ metadata.gz: 281765487d56b6c8cccbe51d56d33074d74307eaf5ff5c618c2ba1c19c0a0b936794fab02ec897ac0768115bb043f100487957a453b49ae067b636d01b332367
7
+ data.tar.gz: '0381cfe02e6b5b898ed5bd4ff1323351cb054b5a983ba7d34c1e67e21bf24a6f1a48b993595d04b59db8c17e25bb51ec06523a7877a50ca8220fea8068e903e9'
data/CHANGELOG.md CHANGED
@@ -1,5 +1,50 @@
1
1
  ## Unreleased
2
2
 
3
+ ## v1.8.0-rc1 (2021-04-20)
4
+
5
+ ### Upgrading
6
+
7
+ This gem now requires Doorkeeper 5.5 and Ruby 2.5.
8
+
9
+ ### Changes
10
+
11
+ - [#138] Support form_post response mode (thanks to @linhdangduy)
12
+ - [#144] Support block syntax for `issuer` configuration (thanks to @maxxsnake)
13
+ - [#145] Register token flows with the strategy instead of the token class (thanks to @paukul)
14
+
15
+ ## v1.7.5 (2020-12-15)
16
+
17
+ ### Changes
18
+
19
+ - [#126] Add discovery_url_options option for discovery endpoints URL generation (thanks to @phlegx)
20
+
21
+ ### Bugfixes
22
+
23
+ - [#123] Remove reference to ApplicationRecord (thanks to @wheeyls)
24
+ - [#124] Clone doorkeeper.grant_flows array before appending 'refresh_token' (thanks to @davidbasalla)
25
+ - [#129] Avoid to use the config alias while supporting Doorkeeper 5.2 (thanks to @kymmt90)
26
+
27
+ ## v1.7.4 (2020-07-06)
28
+
29
+ - [#119] Execute end_session_endpoint in the controllers context (thanks to @joeljunstrom)
30
+
31
+ ## v1.7.3 (2020-07-06)
32
+
33
+ - [#111] Add configuration callback `select_account_for_resource_owner` to support the `prompt=select_account` param
34
+ - [#112] Add grant_types_supported to discovery response
35
+ - [#114] Fix user_info endpoint when used in api mode
36
+ - [#116] Support Doorkeeper API (> 5.4) for registering custom grant flows.
37
+ - [#117] Fix migration template to use Rails migrations DSL for association.
38
+ - [#118] Use fragment urls for implicit flow error redirects (thanks to @joeljunstrom)
39
+
40
+ ## v1.7.2 (2020-05-20)
41
+
42
+ ### Changes
43
+
44
+ - [#108] Add support for Doorkeeper 5.4
45
+ - [#103] Add support for end_session_endpoint
46
+ - [#109] Test against Ruby 2.7 & Rails 6.x
47
+
3
48
  ## v1.7.1 (2020-02-07)
4
49
 
5
50
  ### Upgrading
data/README.md CHANGED
@@ -34,6 +34,7 @@ The following parts of [OpenID Connect Core 1.0](http://openid.net/specs/openid-
34
34
  - [Requesting Claims using Scope Values](http://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims)
35
35
  - [UserInfo Endpoint](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo)
36
36
  - [Normal Claims](http://openid.net/specs/openid-connect-core-1_0.html#NormalClaims)
37
+ - [OAuth 2.0 Form Post Response Mode](https://openid.net/specs/oauth-v2-form-post-response-mode-1_0.html)
37
38
 
38
39
  In addition we also support most of [OpenID Connect Discovery 1.0](http://openid.net/specs/openid-connect-discovery-1_0.html) for automatic configuration discovery.
39
40
 
@@ -103,6 +104,7 @@ The following settings are required in `config/initializers/doorkeeper_openid_co
103
104
 
104
105
  - `issuer`
105
106
  - Identifier for the issuer of the response (i.e. your application URL). The value is a case sensitive URL using the `https` scheme that contains scheme, host, and optionally, port number and path components and no query or fragment components.
107
+ - You can either pass a string value, or a block to generate the issuer dynamically based on the `resource_owner` and `application` passed to the block.
106
108
  - `subject`
107
109
  - Identifier for the resource owner (i.e. the authenticated user). A locally unique and never reassigned identifier within the issuer for the end-user, which is intended to be consumed by the client. The value is a case-sensitive string and must not exceed 255 ASCII characters in length.
108
110
  - The database ID of the user is an acceptable choice if you don't mind leaking that information.
@@ -139,6 +141,10 @@ The following settings are optional, but recommended for better client compatibi
139
141
  - Defines how to trigger reauthentication for the current user (e.g. display a password prompt, or sign-out the user and redirect to the login form).
140
142
  - Required to support the `max_age` and `prompt=login` parameters.
141
143
  - The block is executed in the controller's scope, so you have access to methods like `params`, `redirect_to` etc.
144
+ - `select_account_for_resource_owner`
145
+ - Defines how to trigger account selection to choose the current login user.
146
+ - Required to support the `prompt=select_account` parameter.
147
+ - The block is executed in the controller's scope, so you have access to methods like `params`, `redirect_to` etc.
142
148
 
143
149
  The following settings are optional:
144
150
 
@@ -152,6 +158,40 @@ The following settings are optional:
152
158
  - Note that the OIDC specification mandates HTTPS, so you shouldn't change this
153
159
  for production environments unless you have a really good reason!
154
160
 
161
+ - `end_session_endpoint`
162
+ - The URL that the user is redirected to after ending the session on the client.
163
+ - Used by implementations like https://github.com/IdentityModel/oidc-client-js.
164
+ - The block is executed in the controller's scope, so you have access to your route helpers.
165
+
166
+ - `discovery_url_options`
167
+ - The URL options for every available endpoint to use when generating the endpoint URL in the
168
+ discovery response. Available endpoints: `authorization`, `token`, `revocation`,
169
+ `introspection`, `userinfo`, `jwks`, `webfinger`.
170
+ - This option requires option keys with an available endpoint and
171
+ [URL options](https://api.rubyonrails.org/v6.0.3.3/classes/ActionDispatch/Routing/UrlFor.html#method-i-url_for)
172
+ as value.
173
+ - The default is to use the request host, just like all the other URLs in the discovery response.
174
+ - This is useful when you want endpoints to use a different URL than other requests.
175
+ For example, if your Doorkeeper server is behind a firewall with other servers, you might want
176
+ other servers to use an "internal" URL to communicate with Doorkeeper, but you want to present
177
+ an "external" URL to end-users for authentication requests. Note that this setting does not
178
+ actually change the URL that your Doorkeeper server responds on - that is outside the scope of
179
+ Doorkeeper.
180
+
181
+ ```ruby
182
+ # config/initializers/doorkeeper_openid_connect.rb
183
+ Doorkeeper::OpenidConnect.configure do
184
+ # ...
185
+ discovery_url_options do |request|
186
+ {
187
+ authorization: { host: 'host.example.com' },
188
+ jwks: { protocol: request.ssl? ? :https : :http }
189
+ }
190
+ end
191
+ # ...
192
+ end
193
+ ```
194
+
155
195
  ### Scopes
156
196
 
157
197
  To perform authentication over OpenID Connect, an OAuth client needs to request the `openid` scope. This scope needs to be enabled using either `optional_scopes` in the global Doorkeeper configuration in `config/initializers/doorkeeper.rb`, or by adding it to any OAuth application's `scope` attribute.
@@ -12,6 +12,6 @@ module Doorkeeper
12
12
  end
13
13
  end
14
14
 
15
- Doorkeeper::AuthorizationsController.send :prepend, AuthorizationsExtension
15
+ Doorkeeper::AuthorizationsController.prepend AuthorizationsExtension
16
16
  end
17
17
  end
@@ -1,9 +1,11 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Doorkeeper
2
4
  module OpenidConnect
3
5
  class DiscoveryController < ::Doorkeeper::ApplicationController
4
6
  include Doorkeeper::Helpers::Controller
5
7
 
6
- WEBFINGER_RELATION = 'http://openid.net/specs/connect/1.0/issuer'.freeze
8
+ WEBFINGER_RELATION = 'http://openid.net/specs/connect/1.0/issuer'
7
9
 
8
10
  def provider
9
11
  render json: provider_response
@@ -24,27 +26,25 @@ module Doorkeeper
24
26
  openid_connect = ::Doorkeeper::OpenidConnect.configuration
25
27
  {
26
28
  issuer: openid_connect.issuer,
27
- authorization_endpoint: oauth_authorization_url(protocol: protocol),
28
- token_endpoint: oauth_token_url(protocol: protocol),
29
- revocation_endpoint: oauth_revoke_url(protocol: protocol),
30
- introspection_endpoint: oauth_introspect_url(protocol: protocol),
31
- userinfo_endpoint: oauth_userinfo_url(protocol: protocol),
32
- jwks_uri: oauth_discovery_keys_url(protocol: protocol),
29
+ authorization_endpoint: oauth_authorization_url(authorization_url_options),
30
+ token_endpoint: oauth_token_url(token_url_options),
31
+ revocation_endpoint: oauth_revoke_url(revocation_url_options),
32
+ introspection_endpoint: oauth_introspect_url(introspection_url_options),
33
+ userinfo_endpoint: oauth_userinfo_url(userinfo_url_options),
34
+ jwks_uri: oauth_discovery_keys_url(jwks_url_options),
35
+ end_session_endpoint: instance_exec(&openid_connect.end_session_endpoint),
33
36
 
34
37
  scopes_supported: doorkeeper.scopes,
35
38
 
36
39
  # TODO: support id_token response type
37
40
  response_types_supported: doorkeeper.authorization_response_types,
38
- response_modes_supported: [ 'query', 'fragment' ],
39
-
40
- token_endpoint_auth_methods_supported: [
41
- 'client_secret_basic',
42
- 'client_secret_post',
41
+ response_modes_supported: response_modes_supported(doorkeeper),
42
+ grant_types_supported: grant_types_supported(doorkeeper),
43
43
 
44
- # TODO: look into doorkeeper-jwt_assertion for these
45
- #'client_secret_jwt',
46
- #'private_key_jwt'
47
- ],
44
+ # TODO: look into doorkeeper-jwt_assertion for these
45
+ # 'client_secret_jwt',
46
+ # 'private_key_jwt'
47
+ token_endpoint_auth_methods_supported: %w[client_secret_basic client_secret_post],
48
48
 
49
49
  subject_types_supported: openid_connect.subject_types_supported,
50
50
 
@@ -56,18 +56,28 @@ module Doorkeeper
56
56
  'normal',
57
57
 
58
58
  # TODO: support these
59
- #'aggregated',
60
- #'distributed',
59
+ # 'aggregated',
60
+ # 'distributed',
61
61
  ],
62
62
 
63
- claims_supported: [
64
- 'iss',
65
- 'sub',
66
- 'aud',
67
- 'exp',
68
- 'iat',
63
+ claims_supported: %w[
64
+ iss
65
+ sub
66
+ aud
67
+ exp
68
+ iat
69
69
  ] | openid_connect.claims.to_h.keys,
70
- }
70
+ }.compact
71
+ end
72
+
73
+ def grant_types_supported(doorkeeper)
74
+ grant_types_supported = doorkeeper.grant_flows.dup
75
+ grant_types_supported << 'refresh_token' if doorkeeper.refresh_token_enabled?
76
+ grant_types_supported
77
+ end
78
+
79
+ def response_modes_supported(doorkeeper)
80
+ doorkeeper.authorization_response_flows.flat_map(&:response_mode_matches).uniq
71
81
  end
72
82
 
73
83
  def webfinger_response
@@ -76,7 +86,7 @@ module Doorkeeper
76
86
  links: [
77
87
  {
78
88
  rel: WEBFINGER_RELATION,
79
- href: root_url(protocol: protocol),
89
+ href: root_url(webfinger_url_options),
80
90
  }
81
91
  ]
82
92
  }
@@ -98,6 +108,22 @@ module Doorkeeper
98
108
  def protocol
99
109
  Doorkeeper::OpenidConnect.configuration.protocol.call
100
110
  end
111
+
112
+ def discovery_url_options
113
+ Doorkeeper::OpenidConnect.configuration.discovery_url_options.call(request)
114
+ end
115
+
116
+ def discovery_url_default_options
117
+ {
118
+ protocol: protocol
119
+ }
120
+ end
121
+
122
+ %i[authorization token revocation introspection userinfo jwks webfinger].each do |endpoint|
123
+ define_method :"#{endpoint}_url_options" do
124
+ discovery_url_default_options.merge(discovery_url_options[endpoint.to_sym] || {})
125
+ end
126
+ end
101
127
  end
102
128
  end
103
129
  end
@@ -1,7 +1,11 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Doorkeeper
2
4
  module OpenidConnect
3
5
  class UserinfoController < ::Doorkeeper::ApplicationController
4
- skip_before_action :verify_authenticity_token
6
+ unless Doorkeeper.configuration.api_only
7
+ skip_before_action :verify_authenticity_token
8
+ end
5
9
  before_action -> { doorkeeper_authorize! :openid }
6
10
 
7
11
  def show
@@ -19,4 +19,5 @@ en:
19
19
  resource_owner_from_access_token_not_configured: 'Failure due to Doorkeeper::OpenidConnect.configure.resource_owner_from_access_token missing configuration.'
20
20
  auth_time_from_resource_owner_not_configured: 'Failure due to Doorkeeper::OpenidConnect.configure.auth_time_from_resource_owner missing configuration.'
21
21
  reauthenticate_resource_owner_not_configured: 'Failure due to Doorkeeper::OpenidConnect.configure.reauthenticate_resource_owner missing configuration.'
22
+ select_account_for_resource_owner_not_configured: 'Failure due to Doorkeeper::OpenidConnect.configure.select_account_for_resource_owner missing configuration.'
22
23
  subject_not_configured: 'ID Token generation failed due to Doorkeeper::OpenidConnect.configure.subject missing configuration.'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Doorkeeper
2
4
  module OAuth
3
5
  class IdTokenRequest
@@ -10,7 +12,11 @@ module Doorkeeper
10
12
 
11
13
  def authorize
12
14
  @auth = Authorization::Token.new(pre_auth, resource_owner)
13
- @auth.issue_token
15
+ if @auth.respond_to?(:issue_token!)
16
+ @auth.issue_token!
17
+ else
18
+ @auth.issue_token
19
+ end
14
20
  response
15
21
  end
16
22
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Doorkeeper
2
4
  module OAuth
3
5
  class IdTokenResponse < BaseResponse
@@ -15,19 +17,17 @@ module Doorkeeper
15
17
  true
16
18
  end
17
19
 
18
- def redirect_uri
19
- Authorization::URIBuilder.uri_with_fragment(pre_auth.redirect_uri, redirect_uri_params)
20
- end
21
-
22
- private
23
-
24
- def redirect_uri_params
20
+ def body
25
21
  {
26
22
  expires_in: auth.token.expires_in_seconds,
27
23
  state: pre_auth.state,
28
24
  id_token: id_token.as_jws_token
29
25
  }
30
26
  end
27
+
28
+ def redirect_uri
29
+ Authorization::URIBuilder.uri_with_fragment(pre_auth.redirect_uri, body)
30
+ end
31
31
  end
32
32
  end
33
33
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Doorkeeper
2
4
  module OAuth
3
5
  class IdTokenTokenRequest < IdTokenRequest
@@ -1,9 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Doorkeeper
2
4
  module OAuth
3
5
  class IdTokenTokenResponse < IdTokenResponse
4
- private
5
-
6
- def redirect_uri_params
6
+ def body
7
7
  super.merge({
8
8
  access_token: auth.token.token,
9
9
  token_type: auth.token.token_type
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'doorkeeper'
2
4
  require 'active_model'
3
5
  require 'json/jwt'
@@ -14,7 +16,6 @@ require 'doorkeeper/openid_connect/claims_builder'
14
16
  require 'doorkeeper/openid_connect/claims/claim'
15
17
  require 'doorkeeper/openid_connect/claims/normal_claim'
16
18
  require 'doorkeeper/openid_connect/config'
17
- require 'doorkeeper/openid_connect/response_types_config'
18
19
  require 'doorkeeper/openid_connect/engine'
19
20
  require 'doorkeeper/openid_connect/errors'
20
21
  require 'doorkeeper/openid_connect/id_token'
@@ -42,7 +43,7 @@ module Doorkeeper
42
43
 
43
44
  def self.signing_key
44
45
  key =
45
- if [:HS256, :HS384, :HS512].include?(signing_algorithm)
46
+ if %i[HS256 HS384 HS512].include?(signing_algorithm)
46
47
  configuration.signing_key
47
48
  else
48
49
  OpenSSL::PKey.read(configuration.signing_key)
@@ -61,5 +62,23 @@ module Doorkeeper
61
62
  key.slice(:kty, :kid)
62
63
  end
63
64
  end
65
+
66
+ Doorkeeper::GrantFlow.register(
67
+ :id_token,
68
+ response_type_matches: 'id_token',
69
+ response_mode_matches: %w[fragment form_post],
70
+ response_type_strategy: Doorkeeper::Request::IdToken,
71
+ )
72
+
73
+ Doorkeeper::GrantFlow.register(
74
+ 'id_token token',
75
+ response_type_matches: 'id_token token',
76
+ response_mode_matches: %w[fragment form_post],
77
+ response_type_strategy: Doorkeeper::Request::IdTokenToken,
78
+ )
79
+
80
+ Doorkeeper::GrantFlow.register_alias(
81
+ 'implicit_oidc', as: ['implicit', 'id_token', 'id_token token']
82
+ )
64
83
  end
65
84
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Doorkeeper
2
4
  module OpenidConnect
3
5
  module Claims
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Doorkeeper
2
4
  module OpenidConnect
3
5
  module Claims
@@ -11,10 +13,10 @@ module Doorkeeper
11
13
  name family_name given_name middle_name nickname preferred_username
12
14
  profile picture website gender birthdate zoneinfo locale updated_at
13
15
  ],
14
- email: %i[ email email_verified ],
15
- address: %i[ address ],
16
- phone: %i[ phone_number phone_number_verified ],
17
- }
16
+ email: %i[email email_verified],
17
+ address: %i[address],
18
+ phone: %i[phone_number phone_number_verified],
19
+ }.freeze
18
20
 
19
21
  def initialize(options = {})
20
22
  @name = options[:name].to_sym
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Doorkeeper
2
4
  module OpenidConnect
3
5
  module Claims
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Doorkeeper
2
4
  module OpenidConnect
3
5
  module Claims
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'ostruct'
2
4
 
3
5
  module Doorkeeper
@@ -31,7 +33,7 @@ module Doorkeeper
31
33
  generator: block
32
34
  )
33
35
  end
34
- alias_method :claim, :normal_claim
36
+ alias claim normal_claim
35
37
  end
36
38
  end
37
39
  end