doorkeeper-openid_connect 1.8.3 → 1.8.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -1
- data/lib/doorkeeper/openid_connect/config.rb +2 -61
- data/lib/doorkeeper/openid_connect/helpers/controller.rb +1 -1
- data/lib/doorkeeper/openid_connect/id_token.rb +4 -3
- data/lib/doorkeeper/openid_connect/orm/active_record.rb +1 -1
- data/lib/doorkeeper/openid_connect/version.rb +1 -1
- data/lib/doorkeeper/openid_connect.rb +3 -11
- metadata +9 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83342bd73b56bfb9b995c4c63229d44b1eadb297b17bd7375360c6cf8c52003b
|
4
|
+
data.tar.gz: 023f4e40d227ce921670930d824fe6788673d0cd8079f3654957db3ac6729ca3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02ec6f995359e79577f7e2267bc6bd20bedfc447634af748bcbd54107c4483bbfaa1edc4cfe805fcd20b38f3d3add7ae6aa78eee2d1d1f303d32a5b6930c88c3
|
7
|
+
data.tar.gz: 6e06a331dff7629fa4399dfffa35557d7aa1a599e92881c8e8465bffc309853ea828abd2c1b95c20d926f989525bf44bead030e1afaee09eacc6a37d543d35b3
|
data/CHANGELOG.md
CHANGED
@@ -2,9 +2,32 @@
|
|
2
2
|
|
3
3
|
- [#PR ID] Add your changelog entry here.
|
4
4
|
|
5
|
+
## v1.8.7 (2023-05-18)
|
6
|
+
|
7
|
+
- [#198] Fully qualify `JWT::JWK::Thumbprint` constant with :: (thanks to @stanhu)
|
8
|
+
|
9
|
+
## v1.8.6 (2023-05-12)
|
10
|
+
|
11
|
+
- [#194] Default to RFC 7638 kid fingerprint generation (thanks to @stanhu).
|
12
|
+
|
13
|
+
## v1.8.5 (2023-02-02)
|
14
|
+
|
15
|
+
- [#186] Simplify gem configuration reusing Doorkeeper configuration option DSL (thanks to @nbulaj).
|
16
|
+
- [#182] Drop support for Ruby 2.6 and Rails 5 (thanks to @sato11).
|
17
|
+
- [#188] Fix dookeeper-jwt compatibility (thanks to @zavan).
|
18
|
+
|
19
|
+
## v1.8.4 (2023-02-01)
|
20
|
+
|
21
|
+
Note that v1.8.4 changed the default kid fingerprint generation from RFC 7638 to a format
|
22
|
+
based on the SHA256 digest of the key element. To restore the previous behavior, upgrade to v1.8.6.
|
23
|
+
|
24
|
+
- [#177] Replace `json-jwt` with `ruby-jwt` to align with doorkeeper-jwt (thanks to @kristof-mattei).
|
25
|
+
- [#185] Don't call active_record_options for Doorkeeper >= 5.6.3 (thanks to @zavan).
|
26
|
+
- [#183] Stop render consent screen when user is not logged-in (thanks to @nov).
|
27
|
+
|
5
28
|
## v1.8.3 (2022-12-02)
|
6
29
|
|
7
|
-
- [#180] Add PKCE support to OpenID discovery endpoint.
|
30
|
+
- [#180] Add PKCE support to OpenID discovery endpoint (thanks to @stanhu).
|
8
31
|
|
9
32
|
## v1.8.2 (2022-07-13)
|
10
33
|
|
@@ -35,68 +35,9 @@ module Doorkeeper
|
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
|
-
|
39
|
-
# Defines configuration option
|
40
|
-
#
|
41
|
-
# When you call option, it defines two methods. One method will take place
|
42
|
-
# in the +Config+ class and the other method will take place in the
|
43
|
-
# +Builder+ class.
|
44
|
-
#
|
45
|
-
# The +name+ parameter will set both builder method and config attribute.
|
46
|
-
# If the +:as+ option is defined, the builder method will be the specified
|
47
|
-
# option while the config attribute will be the +name+ parameter.
|
48
|
-
#
|
49
|
-
# If you want to introduce another level of config DSL you can
|
50
|
-
# define +builder_class+ parameter.
|
51
|
-
# Builder should take a block as the initializer parameter and respond to function +build+
|
52
|
-
# that returns the value of the config attribute.
|
53
|
-
#
|
54
|
-
# ==== Options
|
55
|
-
#
|
56
|
-
# * [:+as+] Set the builder method that goes inside +configure+ block
|
57
|
-
# * [+:default+] The default value in case no option was set
|
58
|
-
#
|
59
|
-
# ==== Examples
|
60
|
-
#
|
61
|
-
# option :name
|
62
|
-
# option :name, as: :set_name
|
63
|
-
# option :name, default: 'My Name'
|
64
|
-
# option :scopes builder_class: ScopesBuilder
|
65
|
-
#
|
66
|
-
def option(name, options = {})
|
67
|
-
attribute = options[:as] || name
|
68
|
-
attribute_builder = options[:builder_class]
|
69
|
-
|
70
|
-
Builder.instance_eval do
|
71
|
-
define_method name do |*args, &block|
|
72
|
-
# TODO: is builder_class option being used?
|
73
|
-
value = if attribute_builder
|
74
|
-
attribute_builder.new(&block).build
|
75
|
-
else
|
76
|
-
block || args.first
|
77
|
-
end
|
78
|
-
|
79
|
-
@config.instance_variable_set(:"@#{attribute}", value)
|
80
|
-
end
|
81
|
-
end
|
82
|
-
|
83
|
-
define_method attribute do |*_|
|
84
|
-
if instance_variable_defined?(:"@#{attribute}")
|
85
|
-
instance_variable_get(:"@#{attribute}")
|
86
|
-
else
|
87
|
-
options[:default]
|
88
|
-
end
|
89
|
-
end
|
90
|
-
|
91
|
-
public attribute
|
92
|
-
end
|
93
|
-
|
94
|
-
def extended(base)
|
95
|
-
base.send(:private, :option)
|
96
|
-
end
|
97
|
-
end
|
38
|
+
mattr_reader(:builder_class) { Config::Builder }
|
98
39
|
|
99
|
-
extend Option
|
40
|
+
extend ::Doorkeeper::Config::Option
|
100
41
|
|
101
42
|
option :issuer
|
102
43
|
option :signing_key
|
@@ -31,9 +31,10 @@ module Doorkeeper
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def as_jws_token
|
34
|
-
|
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,7 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'doorkeeper'
|
4
4
|
require 'active_model'
|
5
|
-
require '
|
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
|
-
|
51
|
+
::JWT::JWK.new(key, { kid_generator: ::JWT::JWK::Thumbprint })
|
52
52
|
end
|
53
53
|
|
54
54
|
def self.signing_key_normalized
|
55
|
-
|
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,15 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: doorkeeper-openid_connect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Dengler
|
8
8
|
- Markus Koller
|
9
|
+
- Nikita Bulai
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date:
|
13
|
+
date: 2023-05-18 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: doorkeeper
|
@@ -32,19 +33,19 @@ dependencies:
|
|
32
33
|
- !ruby/object:Gem::Version
|
33
34
|
version: '5.7'
|
34
35
|
- !ruby/object:Gem::Dependency
|
35
|
-
name:
|
36
|
+
name: jwt
|
36
37
|
requirement: !ruby/object:Gem::Requirement
|
37
38
|
requirements:
|
38
39
|
- - ">="
|
39
40
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
41
|
+
version: '2.5'
|
41
42
|
type: :runtime
|
42
43
|
prerelease: false
|
43
44
|
version_requirements: !ruby/object:Gem::Requirement
|
44
45
|
requirements:
|
45
46
|
- - ">="
|
46
47
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
48
|
+
version: '2.5'
|
48
49
|
- !ruby/object:Gem::Dependency
|
49
50
|
name: conventional-changelog
|
50
51
|
requirement: !ruby/object:Gem::Requirement
|
@@ -119,6 +120,7 @@ description: OpenID Connect extension for Doorkeeper.
|
|
119
120
|
email:
|
120
121
|
- sam.dengler@playonsports.com
|
121
122
|
- markus-koller@gmx.ch
|
123
|
+
- bulajnikita@gmail.com
|
122
124
|
executables: []
|
123
125
|
extensions: []
|
124
126
|
extra_rdoc_files: []
|
@@ -177,14 +179,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
177
179
|
requirements:
|
178
180
|
- - ">="
|
179
181
|
- !ruby/object:Gem::Version
|
180
|
-
version: '2.
|
182
|
+
version: '2.7'
|
181
183
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
182
184
|
requirements:
|
183
185
|
- - ">="
|
184
186
|
- !ruby/object:Gem::Version
|
185
187
|
version: '0'
|
186
188
|
requirements: []
|
187
|
-
rubygems_version: 3.1.
|
189
|
+
rubygems_version: 3.1.6
|
188
190
|
signing_key:
|
189
191
|
specification_version: 4
|
190
192
|
summary: OpenID Connect extension for Doorkeeper.
|