doorkeeper-openid_connect 1.8.3 → 1.8.5
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -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: 5bff9200998de53d57960fb1b0bd63e2a692e214285fdf720b26b574fd2ab20b
|
4
|
+
data.tar.gz: 83143a584098d2c164ad076d00b71af22f74c54a9c99c2cde823bc89e13e6bc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19a46eaf1bb1224a0a1e3e76fd59a7a9fd90d7bafa3c0da6c68f1684a199fec659627dc0d13600bda8aca1267bcf386317a80773612110a396f750bffa0cd6e8
|
7
|
+
data.tar.gz: 4ad9bd1ddfaf2b0e5b01e92559b134ed36f39e01df9612a2763368787f13a16ca0bccbc3d18ae538b2208daf7b53e39453a66ee114b2c112b596f5a670a4d151
|
data/CHANGELOG.md
CHANGED
@@ -2,9 +2,24 @@
|
|
2
2
|
|
3
3
|
- [#PR ID] Add your changelog entry here.
|
4
4
|
|
5
|
+
## v1.8.5 (2023-02-02)
|
6
|
+
|
7
|
+
- [#186] Simplify gem configuration reusing Doorkeeper configuration option DSL (thanks to @nbulaj).
|
8
|
+
- [#182] Drop support for Ruby 2.6 and Rails 5 (thanks to @sato11).
|
9
|
+
- [#188] Fix dookeeper-jwt compatibility (thanks to @zavan).
|
10
|
+
|
11
|
+
## v1.8.4 (2023-02-01)
|
12
|
+
|
13
|
+
- [#185] Don't call active_record_options for Doorkeeper >= 5.6.3 (thanks to @zavan).
|
14
|
+
- [#183] Stop render consent screen when user is not logged-in (thanks to @nov).
|
15
|
+
|
5
16
|
## v1.8.3 (2022-12-02)
|
6
17
|
|
7
|
-
- [#180] Add PKCE support to OpenID discovery endpoint.
|
18
|
+
- [#180] Add PKCE support to OpenID discovery endpoint (thanks to @stanhu).
|
19
|
+
|
20
|
+
## Unreleased next
|
21
|
+
|
22
|
+
- [#177] Replace `json-jwt` with `ruby-jwt` to align with doorkeeper-jwt (thanks to @kristof-mattei).
|
8
23
|
|
9
24
|
## v1.8.2 (2022-07-13)
|
10
25
|
|
@@ -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)
|
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.5
|
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-02-02 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.
|