doorkeeper 5.6.1 → 5.6.2

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

Potentially problematic release.


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

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ce1eaa79936bb41cc80803251a0467452fe07f2ffc00f4f2568a136d7d082775
4
- data.tar.gz: 67803c41e4db2123e43af3adce5f9cbe6bdae3b845ddbbd83b4f0bfdc1c867fc
3
+ metadata.gz: 8c22e5cf14aebfd8b75510d028c123f9a924d13bf08c2717f2d7ce6c8bc202a1
4
+ data.tar.gz: 5c625f6be3f5412c546a175c310577c737407690328e6696a773ab74dd1abe13
5
5
  SHA512:
6
- metadata.gz: 46918fc44f2d6f98699457745fc7e5fe6ae851664b3f1d256173ef4638358f734f737f72ecf029d9676a942623222063f5b53771a7b3cc75624fd0a94dd8b051
7
- data.tar.gz: e4134baf4b4f5757167fc4f11e12ef92066e884cb4988e2d667a3c6df53962e75ab39357b8022b320891653d362c5b4ea4b087e030847101da1419bdf1581ee2
6
+ metadata.gz: 127dd3e716bfde2c825ba1d6c4fee662a80a809063a8bd0d5480767fc472c41a6208742407f47656dae95cb7d41b1cb30a920b0270fd2c194a3267fc2c843626
7
+ data.tar.gz: e17e0349cefce41f7767f944fded43b71221b0df82042a9fb9c0dddb464308f3642fe2af7fc61bc1ec4ebb09cb3d2ea1d7a3040adc41130259e495cf3e129386
data/CHANGELOG.md CHANGED
@@ -9,6 +9,10 @@ User-visible changes worth mentioning.
9
9
 
10
10
  - [#ID] Add your PR description here.
11
11
 
12
+ ## 5.6.2
13
+
14
+ - [#1604] Fix fetching of the application when custom application_class defined.
15
+
12
16
  ## 5.6.1
13
17
 
14
18
  - [#1593] Add support for Trilogy ActiveRecord adapter.
@@ -59,7 +59,6 @@ module Doorkeeper
59
59
  resource_owner,
60
60
  )
61
61
 
62
- application = pre_auth.client.is_a?(Doorkeeper::Application) ? pre_auth.client : pre_auth.client.application if pre_auth.client
63
62
  @token = Doorkeeper.config.access_token_model.find_or_create_for(
64
63
  application: application,
65
64
  resource_owner: resource_owner,
@@ -69,6 +68,12 @@ module Doorkeeper
69
68
  )
70
69
  end
71
70
 
71
+ def application
72
+ return unless pre_auth.client
73
+
74
+ pre_auth.client.is_a?(Doorkeeper.config.application_model) ? pre_auth.client : pre_auth.client.application
75
+ end
76
+
72
77
  def oob_redirect
73
78
  {
74
79
  controller: controller,
@@ -28,9 +28,8 @@ module Doorkeeper
28
28
 
29
29
  def find_or_create_access_token(client, resource_owner, scopes, server)
30
30
  context = Authorization::Token.build_context(client, grant_type, scopes, resource_owner)
31
- application = client.is_a?(Doorkeeper::Application) ? client : client.application if client
32
31
  @access_token = server_config.access_token_model.find_or_create_for(
33
- application: application,
32
+ application: client.is_a?(server_config.application_model) ? client : client&.application,
34
33
  resource_owner: resource_owner,
35
34
  scopes: scopes,
36
35
  expires_in: Authorization::Token.access_token_expires_in(server, context),
@@ -13,7 +13,7 @@ module Doorkeeper
13
13
  end
14
14
 
15
15
  with_revocation(existing_token: existing_token) do
16
- application = client.is_a?(Doorkeeper::Application) ? client : client.application if client
16
+ application = client.is_a?(server_config.application_model) ? client : client&.application
17
17
  server_config.access_token_model.create_for(
18
18
  application: application,
19
19
  resource_owner: nil,
@@ -5,7 +5,7 @@ module Doorkeeper
5
5
  # Semantic versioning
6
6
  MAJOR = 5
7
7
  MINOR = 6
8
- TINY = 1
8
+ TINY = 2
9
9
  PRE = nil
10
10
 
11
11
  # Full version number
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.6.1
4
+ version: 5.6.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: 2022-11-28 00:00:00.000000000 Z
14
+ date: 2022-11-29 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: railties
@@ -359,7 +359,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
359
359
  - !ruby/object:Gem::Version
360
360
  version: '0'
361
361
  requirements: []
362
- rubygems_version: 3.0.8
362
+ rubygems_version: 3.1.4
363
363
  signing_key:
364
364
  specification_version: 4
365
365
  summary: OAuth 2 provider for Rails and Grape