openid_connect 0.0.29 → 0.0.30

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- openid_connect (0.0.28)
4
+ openid_connect (0.0.29)
5
5
  activemodel (>= 3)
6
6
  attr_required (>= 0.0.3)
7
7
  json (>= 1.4.3)
@@ -15,20 +15,17 @@ PATH
15
15
  GEM
16
16
  remote: http://rubygems.org/
17
17
  specs:
18
- activemodel (3.1.0)
19
- activesupport (= 3.1.0)
20
- bcrypt-ruby (~> 3.0.0)
18
+ activemodel (3.1.1)
19
+ activesupport (= 3.1.1)
21
20
  builder (~> 3.0.0)
22
21
  i18n (~> 0.6)
23
- activesupport (3.1.0)
22
+ activesupport (3.1.1)
24
23
  multi_json (~> 1.0)
25
24
  addressable (2.2.6)
26
25
  attr_required (0.0.3)
27
- bcrypt-ruby (3.0.1)
28
- bcrypt-ruby (3.0.1-java)
29
26
  bouncy-castle-java (1.5.0146.1)
30
27
  builder (3.0.0)
31
- crack (0.3.0)
28
+ crack (0.3.1)
32
29
  diff-lcs (1.1.3)
33
30
  httpclient (2.2.1)
34
31
  i18n (0.6.0)
@@ -46,7 +43,7 @@ GEM
46
43
  mime-types (1.16)
47
44
  multi_json (1.0.3)
48
45
  polyglot (0.3.2)
49
- rack (1.3.3)
46
+ rack (1.3.4)
50
47
  rack-oauth2 (0.11.0)
51
48
  activesupport (>= 2.3)
52
49
  attr_required (>= 0.0.3)
@@ -55,8 +52,8 @@ GEM
55
52
  json (>= 1.4.3)
56
53
  rack (>= 1.1)
57
54
  rake (0.9.2)
58
- rcov (0.9.10)
59
- rcov (0.9.10-java)
55
+ rcov (0.9.11)
56
+ rcov (0.9.11-java)
60
57
  rspec (2.6.0)
61
58
  rspec-core (~> 2.6.0)
62
59
  rspec-expectations (~> 2.6.0)
@@ -74,7 +71,7 @@ GEM
74
71
  treetop (1.4.10)
75
72
  polyglot
76
73
  polyglot (>= 0.3.1)
77
- tzinfo (0.3.29)
74
+ tzinfo (0.3.30)
78
75
  url_safe_base64 (0.2.1)
79
76
  validate_email (0.1.5)
80
77
  activemodel (>= 3.0)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.29
1
+ 0.0.30
@@ -6,9 +6,11 @@ module OpenIDConnect
6
6
  include AttrOptional
7
7
 
8
8
  attr_reader :raw
9
- attr_optional :authorization_endpoint, :token_endpoint, :registration_endpoint
10
- attr_optional :user_info_endpoint, :check_session_endpoint, :refresh_session_endpoint, :end_session_endpoint
11
- attr_optional :jwk_document, :scopes_supported, :flows_supported, :iso29115_supported
9
+ attr_optional :version, :issuer
10
+ attr_optional :authorization_endpoint, :token_endpoint, :user_info_endpoint
11
+ attr_optional :check_id_endpoint, :refresh_session_endpoint, :end_session_endpoint
12
+ attr_optional :jwk_document, :x509_url, :registration_endpoint
13
+ attr_optional :scopes_supported, :flows_supported, :iso29115_supported, :identifiers_supported
12
14
 
13
15
  def initialize(hash)
14
16
  optional_attributes.each do |key|
@@ -0,0 +1,13 @@
1
+ {
2
+ "version": "3.0",
3
+ "issuer": "https://connect-op.heroku.com",
4
+ "authorization_endpoint": "https://connect-op.heroku.com/authorizations/new",
5
+ "token_endpoint": "https://connect-op.heroku.com/access_tokens",
6
+ "user_info_endpoint": "https://connect-op.heroku.com/user_info",
7
+ "check_id_endpoint": "https://connect-op.heroku.com/id_token",
8
+ "registration_endpoint": "https://connect-op.heroku.com/connect/client",
9
+ "scopes_supported": ["openid", "profile", "email", "address", "PPID"],
10
+ "flows_supported": ["code", "token", "id_token", "code token", "code id_token", "id_token token"],
11
+ "identifiers_supported": ["public", "ppid"],
12
+ "x509_url": "https://connect-op.heroku.com/cert.pem"
13
+ }
@@ -1,3 +1,3 @@
1
1
  {
2
- "locations": ["https://server.example.com/authorize"]
2
+ "locations": ["https://server.example.com"]
3
3
  }
@@ -0,0 +1,30 @@
1
+ require 'spec_helper'
2
+
3
+ describe OpenIDConnect::Discovery::Provider::Config do
4
+ let(:provider) { 'https://connect-op.heroku.com' }
5
+ let(:endpoint) { "https://connect-op.heroku.com/.well-known/openid-configuration" }
6
+
7
+ describe 'discover!' do
8
+ it 'should setup given attributes' do
9
+ mock_json :get, endpoint, 'discovery/config' do
10
+ config = OpenIDConnect::Discovery::Provider::Config.discover! provider
11
+ config.should be_instance_of OpenIDConnect::Discovery::Provider::Config::Response
12
+ config.version.should == '3.0'
13
+ config.issuer.should == 'https://connect-op.heroku.com'
14
+ config.authorization_endpoint.should == 'https://connect-op.heroku.com/authorizations/new'
15
+ config.token_endpoint.should == 'https://connect-op.heroku.com/access_tokens'
16
+ config.user_info_endpoint.should == 'https://connect-op.heroku.com/user_info'
17
+ config.check_id_endpoint.should == 'https://connect-op.heroku.com/id_token'
18
+ config.refresh_session_endpoint.should be_nil
19
+ config.end_session_endpoint.should be_nil
20
+ config.jwk_document.should be_nil
21
+ config.x509_url.should == 'https://connect-op.heroku.com/cert.pem'
22
+ config.registration_endpoint.should == 'https://connect-op.heroku.com/connect/client'
23
+ config.scopes_supported.should == ["openid", "profile", "email", "address", "PPID"]
24
+ config.flows_supported.should == ["code", "token", "id_token", "code token", "code id_token", "id_token token"]
25
+ config.iso29115_supported.should be_nil
26
+ config.identifiers_supported.should == ["public", "ppid"]
27
+ end
28
+ end
29
+ end
30
+ end
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe OpenIDConnect::Discovery::Provider do
4
- let(:provider) { 'https://server.example.com/authorize' }
4
+ let(:provider) { 'https://server.example.com' }
5
5
  let(:discover) { OpenIDConnect::Discovery::Provider.discover! identifier }
6
6
  let(:endpoint) { "https://#{host}/.well-known/simple-web-discovery" }
7
7
  let(:query) do
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: openid_connect
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.29
5
+ version: 0.0.30
6
6
  platform: ruby
7
7
  authors:
8
8
  - nov matake
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-09-21 00:00:00 Z
13
+ date: 2011-10-11 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: json
@@ -206,6 +206,7 @@ files:
206
206
  - spec/mock_response/access_token/bearer.json
207
207
  - spec/mock_response/access_token/bearer_with_id_token.json
208
208
  - spec/mock_response/access_token/mac.json
209
+ - spec/mock_response/discovery/config.json
209
210
  - spec/mock_response/discovery/swd.json
210
211
  - spec/mock_response/errors/insufficient_scope.json
211
212
  - spec/mock_response/errors/invalid_access_token.json
@@ -220,6 +221,7 @@ files:
220
221
  - spec/openid_connect/discovery/principal/uri_spec.rb
221
222
  - spec/openid_connect/discovery/principal/xri_spec.rb
222
223
  - spec/openid_connect/discovery/principal_spec.rb
224
+ - spec/openid_connect/discovery/provider/config_spec.rb
223
225
  - spec/openid_connect/discovery/provider_spec.rb
224
226
  - spec/openid_connect/exception_spec.rb
225
227
  - spec/openid_connect/response_object/id_token_spec.rb
@@ -266,6 +268,7 @@ test_files:
266
268
  - spec/mock_response/access_token/bearer.json
267
269
  - spec/mock_response/access_token/bearer_with_id_token.json
268
270
  - spec/mock_response/access_token/mac.json
271
+ - spec/mock_response/discovery/config.json
269
272
  - spec/mock_response/discovery/swd.json
270
273
  - spec/mock_response/errors/insufficient_scope.json
271
274
  - spec/mock_response/errors/invalid_access_token.json
@@ -280,6 +283,7 @@ test_files:
280
283
  - spec/openid_connect/discovery/principal/uri_spec.rb
281
284
  - spec/openid_connect/discovery/principal/xri_spec.rb
282
285
  - spec/openid_connect/discovery/principal_spec.rb
286
+ - spec/openid_connect/discovery/provider/config_spec.rb
283
287
  - spec/openid_connect/discovery/provider_spec.rb
284
288
  - spec/openid_connect/exception_spec.rb
285
289
  - spec/openid_connect/response_object/id_token_spec.rb