openid_connect 0.0.33 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +1 -2
- data/Gemfile.lock +14 -14
- data/VERSION +1 -1
- data/lib/openid_connect.rb +7 -1
- data/openid_connect.gemspec +2 -2
- data/spec/openid_connect_spec.rb +15 -0
- metadata +30 -30
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
openid_connect (0.0.
|
4
|
+
openid_connect (0.0.33)
|
5
5
|
activemodel (>= 3)
|
6
6
|
attr_required (>= 0.0.3)
|
7
7
|
json (>= 1.4.3)
|
8
8
|
json-jwt (>= 0.0.3)
|
9
|
-
rack-oauth2 (>= 0.
|
10
|
-
swd (>= 0.0
|
9
|
+
rack-oauth2 (>= 0.14.0)
|
10
|
+
swd (>= 0.1.0)
|
11
11
|
tzinfo
|
12
12
|
validate_email
|
13
13
|
validate_url
|
@@ -15,17 +15,17 @@ PATH
|
|
15
15
|
GEM
|
16
16
|
remote: http://rubygems.org/
|
17
17
|
specs:
|
18
|
-
activemodel (3.1
|
19
|
-
activesupport (= 3.1
|
18
|
+
activemodel (3.2.1)
|
19
|
+
activesupport (= 3.2.1)
|
20
20
|
builder (~> 3.0.0)
|
21
|
+
activesupport (3.2.1)
|
21
22
|
i18n (~> 0.6)
|
22
|
-
activesupport (3.1.3)
|
23
23
|
multi_json (~> 1.0)
|
24
24
|
addressable (2.2.6)
|
25
25
|
attr_required (0.0.3)
|
26
26
|
bouncy-castle-java (1.5.0146.1)
|
27
27
|
builder (3.0.0)
|
28
|
-
configatron (2.
|
28
|
+
configatron (2.9.0)
|
29
29
|
yamler (>= 0.1.0)
|
30
30
|
cover_me (1.2.0)
|
31
31
|
configatron
|
@@ -35,24 +35,24 @@ GEM
|
|
35
35
|
hashie (1.2.0)
|
36
36
|
httpclient (2.2.4)
|
37
37
|
i18n (0.6.0)
|
38
|
-
jruby-openssl (0.7.
|
39
|
-
bouncy-castle-java
|
38
|
+
jruby-openssl (0.7.5)
|
39
|
+
bouncy-castle-java (>= 1.5.0146.1)
|
40
40
|
json (1.6.5)
|
41
41
|
json (1.6.5-java)
|
42
|
-
json-jwt (0.0.
|
42
|
+
json-jwt (0.0.5)
|
43
43
|
activesupport (>= 2.3)
|
44
44
|
i18n
|
45
45
|
json (>= 1.4.3)
|
46
46
|
url_safe_base64
|
47
|
-
mail (2.4.
|
47
|
+
mail (2.4.1)
|
48
48
|
i18n (>= 0.4.0)
|
49
49
|
mime-types (~> 1.16)
|
50
50
|
treetop (~> 1.4.8)
|
51
51
|
mime-types (1.17.2)
|
52
52
|
multi_json (1.0.4)
|
53
53
|
polyglot (0.3.3)
|
54
|
-
rack (1.4.
|
55
|
-
rack-oauth2 (0.
|
54
|
+
rack (1.4.1)
|
55
|
+
rack-oauth2 (0.14.0)
|
56
56
|
activesupport (>= 2.3)
|
57
57
|
attr_required (>= 0.0.3)
|
58
58
|
httpclient (>= 2.2.0.2)
|
@@ -68,7 +68,7 @@ GEM
|
|
68
68
|
rspec-expectations (2.8.0)
|
69
69
|
diff-lcs (~> 1.1.2)
|
70
70
|
rspec-mocks (2.8.0)
|
71
|
-
swd (0.0
|
71
|
+
swd (0.1.0)
|
72
72
|
activesupport (>= 3)
|
73
73
|
attr_required (>= 0.0.3)
|
74
74
|
httpclient (>= 2.2.1)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0
|
1
|
+
0.1.0
|
data/lib/openid_connect.rb
CHANGED
@@ -54,9 +54,15 @@ module OpenIDConnect
|
|
54
54
|
_http_client_ = HTTPClient.new(
|
55
55
|
:agent_name => "OpenIDConnect (#{VERSION})"
|
56
56
|
)
|
57
|
-
_http_client_.request_filter << Debugger::RequestFilter.new if
|
57
|
+
_http_client_.request_filter << Debugger::RequestFilter.new if debugging?
|
58
|
+
http_config.try(:call, _http_client_)
|
58
59
|
_http_client_
|
59
60
|
end
|
61
|
+
def self.http_config(&block)
|
62
|
+
SWD.http_config &block unless SWD.http_config
|
63
|
+
Rack::OAuth2.http_config &block unless Rack::OAuth2.http_config
|
64
|
+
@@http_config ||= block
|
65
|
+
end
|
60
66
|
end
|
61
67
|
|
62
68
|
require 'openid_connect/exception'
|
data/openid_connect.gemspec
CHANGED
@@ -17,8 +17,8 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.add_runtime_dependency "validate_url"
|
18
18
|
s.add_runtime_dependency "validate_email"
|
19
19
|
s.add_runtime_dependency "json-jwt", ">= 0.0.3"
|
20
|
-
s.add_runtime_dependency "swd", ">= 0.0
|
21
|
-
s.add_runtime_dependency "rack-oauth2", ">= 0.
|
20
|
+
s.add_runtime_dependency "swd", ">= 0.1.0"
|
21
|
+
s.add_runtime_dependency "rack-oauth2", ">= 0.14.0"
|
22
22
|
s.add_development_dependency "rake", ">= 0.8"
|
23
23
|
if RUBY_VERSION >= '1.9'
|
24
24
|
s.add_development_dependency "cover_me", ">= 1.2.0"
|
data/spec/openid_connect_spec.rb
CHANGED
@@ -37,4 +37,19 @@ describe OpenIDConnect do
|
|
37
37
|
OpenIDConnect.debugging?.should be_true
|
38
38
|
end
|
39
39
|
end
|
40
|
+
|
41
|
+
describe '.http_client' do
|
42
|
+
context 'with http_config' do
|
43
|
+
before do
|
44
|
+
OpenIDConnect.http_config do |config|
|
45
|
+
config.ssl_config.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
46
|
+
end
|
47
|
+
end
|
48
|
+
it 'should configure OpenIDConnect, SWD and Rack::OAuth2\'s http_client' do
|
49
|
+
[OpenIDConnect, SWD, Rack::OAuth2].each do |klass|
|
50
|
+
klass.http_client.ssl_config.verify_mode.should == OpenSSL::SSL::VERIFY_NONE
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
40
55
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openid_connect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-02-
|
12
|
+
date: 2012-02-06 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|
16
|
-
requirement: &
|
16
|
+
requirement: &70227509878100 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 1.4.3
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70227509878100
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: tzinfo
|
27
|
-
requirement: &
|
27
|
+
requirement: &70227509876760 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70227509876760
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: attr_required
|
38
|
-
requirement: &
|
38
|
+
requirement: &70227509874920 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 0.0.3
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70227509874920
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: activemodel
|
49
|
-
requirement: &
|
49
|
+
requirement: &70227509874300 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '3'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70227509874300
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: validate_url
|
60
|
-
requirement: &
|
60
|
+
requirement: &70227509873680 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70227509873680
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: validate_email
|
71
|
-
requirement: &
|
71
|
+
requirement: &70227509872780 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70227509872780
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: json-jwt
|
82
|
-
requirement: &
|
82
|
+
requirement: &70227509871240 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,32 +87,32 @@ dependencies:
|
|
87
87
|
version: 0.0.3
|
88
88
|
type: :runtime
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70227509871240
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: swd
|
93
|
-
requirement: &
|
93
|
+
requirement: &70227509869260 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
97
97
|
- !ruby/object:Gem::Version
|
98
|
-
version: 0.0
|
98
|
+
version: 0.1.0
|
99
99
|
type: :runtime
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *70227509869260
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: rack-oauth2
|
104
|
-
requirement: &
|
104
|
+
requirement: &70227509861140 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ! '>='
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: 0.
|
109
|
+
version: 0.14.0
|
110
110
|
type: :runtime
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *70227509861140
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: rake
|
115
|
-
requirement: &
|
115
|
+
requirement: &70227509859800 !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|
118
118
|
- - ! '>='
|
@@ -120,10 +120,10 @@ dependencies:
|
|
120
120
|
version: '0.8'
|
121
121
|
type: :development
|
122
122
|
prerelease: false
|
123
|
-
version_requirements: *
|
123
|
+
version_requirements: *70227509859800
|
124
124
|
- !ruby/object:Gem::Dependency
|
125
125
|
name: cover_me
|
126
|
-
requirement: &
|
126
|
+
requirement: &70227509859040 !ruby/object:Gem::Requirement
|
127
127
|
none: false
|
128
128
|
requirements:
|
129
129
|
- - ! '>='
|
@@ -131,10 +131,10 @@ dependencies:
|
|
131
131
|
version: 1.2.0
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
|
-
version_requirements: *
|
134
|
+
version_requirements: *70227509859040
|
135
135
|
- !ruby/object:Gem::Dependency
|
136
136
|
name: rspec
|
137
|
-
requirement: &
|
137
|
+
requirement: &70227509856880 !ruby/object:Gem::Requirement
|
138
138
|
none: false
|
139
139
|
requirements:
|
140
140
|
- - ! '>='
|
@@ -142,10 +142,10 @@ dependencies:
|
|
142
142
|
version: '2'
|
143
143
|
type: :development
|
144
144
|
prerelease: false
|
145
|
-
version_requirements: *
|
145
|
+
version_requirements: *70227509856880
|
146
146
|
- !ruby/object:Gem::Dependency
|
147
147
|
name: webmock
|
148
|
-
requirement: &
|
148
|
+
requirement: &70227509853980 !ruby/object:Gem::Requirement
|
149
149
|
none: false
|
150
150
|
requirements:
|
151
151
|
- - ! '>='
|
@@ -153,7 +153,7 @@ dependencies:
|
|
153
153
|
version: 1.6.2
|
154
154
|
type: :development
|
155
155
|
prerelease: false
|
156
|
-
version_requirements: *
|
156
|
+
version_requirements: *70227509853980
|
157
157
|
description: OpenID Connect Server & Client Library
|
158
158
|
email:
|
159
159
|
- nov@matake.jp
|