doorkeeper-grants_assertion 0.3.0 → 0.3.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 273fce1e5ca103c03349335cfcb0018638e4470fb4540c30f6b7c5249ed13049
|
4
|
+
data.tar.gz: 62124f081f24931632eec0a2dec4e41e941a035047e356b36cd212a529519ffd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17fc554a37c8a928ce013a5b1b618ccd3a1193128d9ab8a2ca83ba4c458af3f4fc9f9e73a933ef8d1a5d0c7e5add5b5a9ac35e58fc9e65366eb2f2a68a65bf1d
|
7
|
+
data.tar.gz: c441e2fa706683a5e0ba08afe4bd28d9f8f0bf9e2f06f6b8f13b8c1a7c7c3cdfaf3f7feed06d885f2ddd2afb738fef596a5c2223b52fcc7a981aad62318c01a9
|
@@ -30,3 +30,12 @@ module Doorkeeper
|
|
30
30
|
end)
|
31
31
|
end
|
32
32
|
end
|
33
|
+
|
34
|
+
# For compatibility with Doorkeeper <= 5.5
|
35
|
+
if defined?(::Doorkeeper::GrantFlow)
|
36
|
+
Doorkeeper::GrantFlow.register(
|
37
|
+
:assertion,
|
38
|
+
grant_type_matches: "assertion",
|
39
|
+
grant_type_strategy: Doorkeeper::Request::Assertion,
|
40
|
+
)
|
41
|
+
end
|
@@ -6,12 +6,7 @@ module Doorkeeper
|
|
6
6
|
delegate :credentials, :resource_owner_from_assertion, :parameters, to: :server
|
7
7
|
|
8
8
|
def request
|
9
|
-
@request ||=
|
10
|
-
Doorkeeper.configuration,
|
11
|
-
client,
|
12
|
-
resource_owner_from_assertion,
|
13
|
-
parameters
|
14
|
-
)
|
9
|
+
@request ||= build_request
|
15
10
|
end
|
16
11
|
|
17
12
|
def authorize
|
@@ -20,6 +15,25 @@ module Doorkeeper
|
|
20
15
|
|
21
16
|
private
|
22
17
|
|
18
|
+
def build_request
|
19
|
+
if ::Gem::Dependency.new('', '>= 5.5.1').match?('', ::Doorkeeper::VERSION::STRING)
|
20
|
+
OAuth::PasswordAccessTokenRequest.new(
|
21
|
+
Doorkeeper.configuration,
|
22
|
+
client,
|
23
|
+
credentials,
|
24
|
+
resource_owner_from_assertion,
|
25
|
+
parameters
|
26
|
+
)
|
27
|
+
else
|
28
|
+
OAuth::PasswordAccessTokenRequest.new(
|
29
|
+
Doorkeeper.configuration,
|
30
|
+
client,
|
31
|
+
resource_owner_from_assertion,
|
32
|
+
parameters
|
33
|
+
)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
23
37
|
def client
|
24
38
|
if credentials
|
25
39
|
server.client
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: doorkeeper-grants_assertion
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tute Costa
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2021-04-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|
@@ -251,7 +251,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
251
251
|
- !ruby/object:Gem::Version
|
252
252
|
version: '0'
|
253
253
|
requirements: []
|
254
|
-
rubygems_version: 3.
|
254
|
+
rubygems_version: 3.1.2
|
255
255
|
signing_key:
|
256
256
|
specification_version: 4
|
257
257
|
summary: Assertion grant extension for Doorkeeper.
|