warden_openid_auth 0.1.1 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +15 -15
- data/lib/warden_openid_auth/openid_metadata.rb +14 -19
- data/lib/warden_openid_auth/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a0478757e0dd6d00dfff2c0b806893b2aa73f4ded0c5ae9d0252a4fd40592e9
|
4
|
+
data.tar.gz: b5b455c5bc7643f7f6c2dcbfceeaa63f1b7fcc3ee2b949712c7a4182041a5645
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d242962c185a92c01891907aa9e6dc6a23b012cca482635123f357a37bd2a911fe5b5103073df9309631f84c64c63ed0a529dc4de939bf951d38b79387b292ac
|
7
|
+
data.tar.gz: df4dc631fb572664da367a2a0b8f613dc16d55278380f6cc8eb6b4e3be3b6cccce6344e984f4ac8ee5be46ae7169e961493ec8878671fc4d0d560fb90090482b
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
warden_openid_auth (0.1.
|
4
|
+
warden_openid_auth (0.1.4)
|
5
5
|
dry-configurable (~> 0.14)
|
6
6
|
dry-monads (~> 1.4)
|
7
7
|
faraday (~> 2.2)
|
@@ -16,11 +16,11 @@ GEM
|
|
16
16
|
public_suffix (>= 2.0.2, < 5.0)
|
17
17
|
ast (2.4.2)
|
18
18
|
byebug (11.1.3)
|
19
|
-
concurrent-ruby (1.1.
|
19
|
+
concurrent-ruby (1.1.10)
|
20
20
|
crack (0.4.5)
|
21
21
|
rexml
|
22
22
|
diff-lcs (1.5.0)
|
23
|
-
dry-configurable (0.
|
23
|
+
dry-configurable (0.15.0)
|
24
24
|
concurrent-ruby (~> 1.0)
|
25
25
|
dry-core (~> 0.6)
|
26
26
|
dry-core (0.7.1)
|
@@ -28,23 +28,23 @@ GEM
|
|
28
28
|
dry-monads (1.4.0)
|
29
29
|
concurrent-ruby (~> 1.0)
|
30
30
|
dry-core (~> 0.7)
|
31
|
-
faraday (2.
|
31
|
+
faraday (2.3.0)
|
32
32
|
faraday-net_http (~> 2.0)
|
33
33
|
ruby2_keywords (>= 0.0.4)
|
34
|
-
faraday-net_http (2.0.
|
34
|
+
faraday-net_http (2.0.3)
|
35
35
|
faraday-retry (1.0.3)
|
36
36
|
hashdiff (1.0.1)
|
37
37
|
jwt (2.3.0)
|
38
|
-
parallel (1.
|
39
|
-
parser (3.1.
|
38
|
+
parallel (1.22.1)
|
39
|
+
parser (3.1.2.0)
|
40
40
|
ast (~> 2.4.1)
|
41
41
|
public_suffix (4.0.6)
|
42
|
-
rack (2.2.3)
|
42
|
+
rack (2.2.3.1)
|
43
43
|
rack-test (1.1.0)
|
44
44
|
rack (>= 1.0, < 3)
|
45
45
|
rainbow (3.1.1)
|
46
46
|
rake (13.0.6)
|
47
|
-
regexp_parser (2.
|
47
|
+
regexp_parser (2.5.0)
|
48
48
|
rexml (3.2.5)
|
49
49
|
rspec (3.11.0)
|
50
50
|
rspec-core (~> 3.11.0)
|
@@ -59,20 +59,20 @@ GEM
|
|
59
59
|
diff-lcs (>= 1.2.0, < 2.0)
|
60
60
|
rspec-support (~> 3.11.0)
|
61
61
|
rspec-support (3.11.0)
|
62
|
-
rubocop (1.
|
62
|
+
rubocop (1.30.0)
|
63
63
|
parallel (~> 1.10)
|
64
64
|
parser (>= 3.1.0.0)
|
65
65
|
rainbow (>= 2.2.2, < 4.0)
|
66
66
|
regexp_parser (>= 1.8, < 3.0)
|
67
|
-
rexml
|
68
|
-
rubocop-ast (>= 1.
|
67
|
+
rexml (>= 3.2.5, < 4.0)
|
68
|
+
rubocop-ast (>= 1.18.0, < 2.0)
|
69
69
|
ruby-progressbar (~> 1.7)
|
70
70
|
unicode-display_width (>= 1.4.0, < 3.0)
|
71
|
-
rubocop-ast (1.
|
71
|
+
rubocop-ast (1.18.0)
|
72
72
|
parser (>= 3.1.1.0)
|
73
73
|
rubocop-rake (0.6.0)
|
74
74
|
rubocop (~> 1.0)
|
75
|
-
rubocop-rspec (2.
|
75
|
+
rubocop-rspec (2.11.1)
|
76
76
|
rubocop (~> 1.19)
|
77
77
|
ruby-progressbar (1.11.0)
|
78
78
|
ruby2_keywords (0.0.5)
|
@@ -99,4 +99,4 @@ DEPENDENCIES
|
|
99
99
|
webmock (~> 3.14)
|
100
100
|
|
101
101
|
BUNDLED WITH
|
102
|
-
2.
|
102
|
+
2.3.15
|
@@ -20,37 +20,32 @@ module WardenOpenidAuth
|
|
20
20
|
@client_id = config.client_id
|
21
21
|
end
|
22
22
|
|
23
|
-
# @return [String] the endpoint for authorization
|
24
|
-
def authorization_endpoint
|
25
|
-
config_document['authorization_endpoint']
|
26
|
-
end
|
27
|
-
|
28
23
|
# @return [String] the full URL for authorization including parameters
|
29
24
|
def authorization_url(redirect_uri:, state:, scope: 'openid profile email')
|
30
|
-
uri = URI(authorization_endpoint)
|
25
|
+
uri = URI(config_document['authorization_endpoint'])
|
31
26
|
uri.query = "client_id=#{url_encode(client_id)}&redirect_uri=#{url_encode(redirect_uri)}" \
|
32
27
|
"&scope=#{url_encode(scope)}&state=#{url_encode(state)}&response_mode=query&response_type=code"
|
33
28
|
uri.to_s
|
34
29
|
end
|
35
30
|
|
36
|
-
# @return [
|
37
|
-
def
|
38
|
-
config_document
|
31
|
+
# @return [Hash] a hash representation of the OpenID configuration document.
|
32
|
+
def to_h
|
33
|
+
config_document
|
39
34
|
end
|
40
35
|
|
41
|
-
#
|
42
|
-
|
43
|
-
|
36
|
+
# Check if the method asked for is a key in the config_document. If it is return it. Otherwise
|
37
|
+
# call parent which will throw a NoMethodError error.
|
38
|
+
def method_missing(name)
|
39
|
+
config_document.fetch(name.to_s) { super }
|
44
40
|
end
|
45
41
|
|
46
|
-
#
|
47
|
-
|
48
|
-
|
49
|
-
|
42
|
+
# if the the object does not respond to the method passed to respond_to? Check if the method
|
43
|
+
# called is a key on config_document, if it is respond with true indicating that the object does
|
44
|
+
# respond to that method.
|
45
|
+
def respond_to_missing?(name)
|
46
|
+
return true if config_document.include?(name.to_s)
|
50
47
|
|
51
|
-
|
52
|
-
def to_h
|
53
|
-
config_document
|
48
|
+
super
|
54
49
|
end
|
55
50
|
|
56
51
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: warden_openid_auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Blayne Farinha
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-configurable
|
@@ -139,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
139
|
- !ruby/object:Gem::Version
|
140
140
|
version: '0'
|
141
141
|
requirements: []
|
142
|
-
rubygems_version: 3.
|
142
|
+
rubygems_version: 3.3.7
|
143
143
|
signing_key:
|
144
144
|
specification_version: 4
|
145
145
|
summary: A warden strategy to login via OpenID
|