openid_connect 0.5.0 → 0.5.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
  SHA1:
3
- metadata.gz: 0a794ead00a4df88df6f42e75c8fbab30e8bc31a
4
- data.tar.gz: 6d6a735d8d0fd25b23c3b77cbe847eedc46408fc
3
+ metadata.gz: 96fafd3eb7736041bdf5095494885111a934d6ee
4
+ data.tar.gz: 6dbcf5e2c2bc38151707b5aae05260ebaa3e7324
5
5
  SHA512:
6
- metadata.gz: e163661d484cf04fb02660783affd6ffab261dade19166c9d22acc0a1ce69eb65f451653f93b313ce454360bbdf52864de09801ce79783ffc860cd19fba381fc
7
- data.tar.gz: cda7908012fd20d5ffdb8e3e73afe149dae37741779d653264f0318c9931520189b5308cf51f22fc9fa6ffaaec1db99b28b232842435c3586d1a24d62cf64ff6
6
+ metadata.gz: 32676583d740a314dc97c5c0e7311b83584e26df6aad0f6f037ba2fa7cd53d39f7a3f0d9d0c745fdeb0a8d53589d672e2dffe6ddc353cccabf3a3d43561583f3
7
+ data.tar.gz: 65b85979a7d62275d5dfe727b1e821132e94115a3b589cf9d76d917459e2b9515ca7e447a77b5f3644c57b69ce55771d9a0c8820907299fd30071476d30e4879
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- openid_connect (0.5.0)
4
+ openid_connect (0.5.1)
5
5
  activemodel (>= 3)
6
6
  attr_required (>= 0.0.5)
7
7
  json (>= 1.4.3)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.0
1
+ 0.5.1
@@ -27,28 +27,37 @@ module OpenIDConnect
27
27
  self.logger = Logger.new(STDOUT)
28
28
  self.logger.progname = 'OpenIDConnect'
29
29
 
30
+ @sub_protocols = [
31
+ SWD,
32
+ WebFinger,
33
+ Rack::OAuth2
34
+ ]
30
35
  def self.debugging?
31
36
  @@debugging
32
37
  end
33
38
  def self.debugging=(boolean)
34
- SWD.debugging = boolean
35
- Rack::OAuth2.debugging = boolean
39
+ @sub_protocols.each do |klass|
40
+ klass.debugging = boolean
41
+ end
36
42
  @@debugging = boolean
37
43
  end
38
44
  def self.debug!
39
- SWD.debug!
40
- Rack::OAuth2.debug!
45
+ @sub_protocols.each do |klass|
46
+ klass.debug!
47
+ end
41
48
  self.debugging = true
42
49
  end
43
50
  def self.debug(&block)
44
- swd_original = SWD.debugging?
45
- rack_oauth2_original = Rack::OAuth2.debugging?
51
+ sub_protocol_originals = @sub_protocols.inject({}) do |sub_protocol_originals, klass|
52
+ sub_protocol_originals.merge!(klass => klass.debugging?)
53
+ end
46
54
  original = self.debugging?
47
55
  debug!
48
56
  yield
49
57
  ensure
50
- SWD.debugging = swd_original
51
- Rack::OAuth2.debugging = rack_oauth2_original
58
+ @sub_protocols.each do |klass|
59
+ klass.debugging = sub_protocol_originals[klass]
60
+ end
52
61
  self.debugging = original
53
62
  end
54
63
  self.debugging = false
@@ -62,8 +71,9 @@ module OpenIDConnect
62
71
  _http_client_
63
72
  end
64
73
  def self.http_config(&block)
65
- SWD.http_config &block unless SWD.http_config
66
- Rack::OAuth2.http_config &block unless Rack::OAuth2.http_config
74
+ @sub_protocols.each do |klass|
75
+ klass.http_config &block unless klass.http_config
76
+ end
67
77
  @@http_config ||= block
68
78
  end
69
79
  end
@@ -15,6 +15,7 @@ describe OpenIDConnect do
15
15
  it 'should enable debugging within given block' do
16
16
  OpenIDConnect.debug do
17
17
  SWD.debugging?.should be_true
18
+ WebFinger.debugging?.should be_true
18
19
  Rack::OAuth2.debugging?.should be_true
19
20
  OpenIDConnect.debugging?.should be_true
20
21
  end
@@ -25,14 +26,17 @@ describe OpenIDConnect do
25
26
 
26
27
  it 'should not force disable debugging' do
27
28
  SWD.debug!
29
+ WebFinger.debug!
28
30
  Rack::OAuth2.debug!
29
31
  OpenIDConnect.debug!
30
32
  OpenIDConnect.debug do
31
33
  SWD.debugging?.should be_true
34
+ WebFinger.debugging?.should be_true
32
35
  Rack::OAuth2.debugging?.should be_true
33
36
  OpenIDConnect.debugging?.should be_true
34
37
  end
35
38
  SWD.debugging?.should be_true
39
+ WebFinger.debugging?.should be_true
36
40
  Rack::OAuth2.debugging?.should be_true
37
41
  OpenIDConnect.debugging?.should be_true
38
42
  end
@@ -46,7 +50,7 @@ describe OpenIDConnect do
46
50
  end
47
51
  end
48
52
  it 'should configure OpenIDConnect, SWD and Rack::OAuth2\'s http_client' do
49
- [OpenIDConnect, SWD, Rack::OAuth2].each do |klass|
53
+ [OpenIDConnect, SWD, WebFinger, Rack::OAuth2].each do |klass|
50
54
  klass.http_client.ssl_config.verify_mode.should == OpenSSL::SSL::VERIFY_NONE
51
55
  end
52
56
  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.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - nov matake