doorkeeper-openid_connect 1.8.3 → 1.8.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 383563b00b174c7789b58e492149d560a7b9d80443898b0530e4e7f63c9f741a
4
- data.tar.gz: be63514852442c766cbc29129e54675c5908240f3cf55f35ea0d46cd893e0fc0
3
+ metadata.gz: 981e1ef7a0f2f47cf63c8824c7cdfa802127f291a54836cb3a20e39b1bcd7ca9
4
+ data.tar.gz: 95b4e9a230daaebeee5df8d251a78921fe85178bbd656b7acd868afbb0871c83
5
5
  SHA512:
6
- metadata.gz: 15a2b70ca0dfb03a98e6cbf39c12f3ddd06bfdc7baa65fb6ab3e5e08202dc4015d1f2e17ff59506d5e3f49134c58ba4932099e908741d2b53c2be92499a78fec
7
- data.tar.gz: 65717e4cdc72d5199dd07d1dbddd2496f5fb3ae542c0e5f56feabdf63c13956d91cc93fbdeb0c1893f923b8c18070ea89997972be12e8c2bc4490ea4abbe5b39
6
+ metadata.gz: 569d7fcb3e77e8e77f2e3a2abe6b02c6664416e136e30fecc2c78462c74a87b936ec9b1d665d90c062db4b5ce2078ec26a93b938912b2e97dc6ebbb7c93ac94d
7
+ data.tar.gz: 60df7a49cef6ee6ff57efc4b9fc775053d0406015a9dc3fac0455d6177f86dcf98b8d6384204fc54033c2b4bb82a8947808e960543c47c1cceba1796035a5e63
data/CHANGELOG.md CHANGED
@@ -1,11 +1,17 @@
1
1
  ## Unreleased
2
2
 
3
3
  - [#PR ID] Add your changelog entry here.
4
+ - [#185] Don't call active_record_options for Doorkeeper >= 5.6.3.
5
+ - [#183] stop render consent screen when user is not logged-in.
4
6
 
5
7
  ## v1.8.3 (2022-12-02)
6
8
 
7
9
  - [#180] Add PKCE support to OpenID discovery endpoint.
8
10
 
11
+ ## Unreleased next
12
+
13
+ - [#177] Replace `json-jwt` with `ruby-jwt` to align with doorkeeper-jwt.
14
+
9
15
  ## v1.8.2 (2022-07-13)
10
16
 
11
17
  - [#168] Allow to use custom doorkeeper access grant model (thanks @nov).
@@ -76,7 +76,7 @@ module Doorkeeper
76
76
  when 'login'
77
77
  reauthenticate_oidc_resource_owner(owner) if owner
78
78
  when 'consent'
79
- render :new
79
+ render :new if owner
80
80
  when 'select_account'
81
81
  select_account_for_oidc_resource_owner(owner)
82
82
  else
@@ -31,9 +31,10 @@ module Doorkeeper
31
31
  end
32
32
 
33
33
  def as_jws_token
34
- JSON::JWT.new(as_json).sign(
35
- Doorkeeper::OpenidConnect.signing_key,
36
- Doorkeeper::OpenidConnect.signing_algorithm
34
+ JWT.encode(as_json,
35
+ Doorkeeper::OpenidConnect.signing_key.keypair,
36
+ Doorkeeper::OpenidConnect.signing_algorithm.to_s,
37
+ { kid: Doorkeeper::OpenidConnect.signing_key.kid }
37
38
  ).to_s
38
39
  end
39
40
 
@@ -18,7 +18,7 @@ module Doorkeeper
18
18
  Doorkeeper::AccessGrant.prepend Doorkeeper::OpenidConnect::AccessGrant
19
19
  end
20
20
 
21
- if Doorkeeper.configuration.active_record_options[:establish_connection]
21
+ if Doorkeeper.configuration.respond_to?(:active_record_options) && Doorkeeper.configuration.active_record_options[:establish_connection]
22
22
  [Doorkeeper::OpenidConnect::Request].each do |c|
23
23
  c.send :establish_connection, Doorkeeper.configuration.active_record_options[:establish_connection]
24
24
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Doorkeeper
4
4
  module OpenidConnect
5
- VERSION = '1.8.3'
5
+ VERSION = '1.8.4'
6
6
  end
7
7
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  require 'doorkeeper'
4
4
  require 'active_model'
5
- require 'json/jwt'
5
+ require 'jwt'
6
6
 
7
7
  require 'doorkeeper/request'
8
8
  require 'doorkeeper/request/id_token'
@@ -48,19 +48,11 @@ module Doorkeeper
48
48
  else
49
49
  OpenSSL::PKey.read(configuration.signing_key)
50
50
  end
51
- JSON::JWK.new(key)
51
+ JWT::JWK.new(key)
52
52
  end
53
53
 
54
54
  def self.signing_key_normalized
55
- key = signing_key
56
- case key[:kty].to_sym
57
- when :RSA
58
- key.slice(:kty, :kid, :e, :n)
59
- when :EC
60
- key.slice(:kty, :kid, :crv, :x, :y)
61
- when :oct
62
- key.slice(:kty, :kid)
63
- end
55
+ signing_key.export
64
56
  end
65
57
 
66
58
  Doorkeeper::GrantFlow.register(
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doorkeeper-openid_connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.3
4
+ version: 1.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Dengler
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-12-02 00:00:00.000000000 Z
12
+ date: 2023-02-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: doorkeeper
@@ -32,19 +32,19 @@ dependencies:
32
32
  - !ruby/object:Gem::Version
33
33
  version: '5.7'
34
34
  - !ruby/object:Gem::Dependency
35
- name: json-jwt
35
+ name: jwt
36
36
  requirement: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 1.15.0
40
+ version: '2.5'
41
41
  type: :runtime
42
42
  prerelease: false
43
43
  version_requirements: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 1.15.0
47
+ version: '2.5'
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: conventional-changelog
50
50
  requirement: !ruby/object:Gem::Requirement
@@ -184,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
184
184
  - !ruby/object:Gem::Version
185
185
  version: '0'
186
186
  requirements: []
187
- rubygems_version: 3.1.4
187
+ rubygems_version: 3.1.6
188
188
  signing_key:
189
189
  specification_version: 4
190
190
  summary: OpenID Connect extension for Doorkeeper.