openid_connect 0.8.3 → 0.9.0

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: 2bfde7947a34f4c9d71487b01a0019c7e0df92eb
4
- data.tar.gz: e4ebdf4d952d2e5047e0855948878496e7a10de9
3
+ metadata.gz: 899c1fd651dc04dd6a40fe6f0487c253810ba828
4
+ data.tar.gz: 9e84f6b6ac18aafe440cdc043a767e777c8a885a
5
5
  SHA512:
6
- metadata.gz: fda477b4b6905f58a5a629ca1c18317460ad71a00516a0d391b639aca4af543b7ab05271bc215c7c33b23ea8565703f6caa8d02e244f886a4a399c4c24ac7e33
7
- data.tar.gz: b7475ed2f30c47ab9d54c5aef8447c0361a5426f01dedb41f5e4049c477b8fada99527c43b767b8530c5dc587f7f7276dca6021b9b9ccc342de407131f88a210
6
+ metadata.gz: 670e94a0aca30b854d76212eeeb64bdf5a378fc9034efc7ded8a5ccad443f017826b47eb8281aa51aeec522d4c6ac1f299a3886c08458acd4cfd14e951656797
7
+ data.tar.gz: 451cc94ae1301eea1388391bfcbeded874e41b9dc2c8e2fbe9245b01da0f0b0309590414621de1524dd4ac4147e9d0ab3e6ab64f12735e5d0d4c7f96db8fcdbc
@@ -18,12 +18,12 @@ OpenID Connect Server & Client Library
18
18
 
19
19
  === Provider
20
20
 
21
- * Running on Heroku (http://connect-op.heroku.com)
21
+ * Running on Heroku (https://connect-op.herokuapp.com)
22
22
  * Source on GitHub (https://github.com/nov/openid_connect_sample)
23
23
 
24
24
  === Relying Party
25
25
 
26
- * Running on Heroku (https://connect-rp.heroku.com)
26
+ * Running on Heroku (https://connect-rp.herokuapp.com)
27
27
  * Source on GitHub (https://github.com/nov/openid_connect_sample_rp)
28
28
 
29
29
  == Note on Patches/Pull Requests
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.3
1
+ 0.9.0
@@ -8,7 +8,6 @@ module OpenIDConnect
8
8
  end
9
9
 
10
10
  def authorization_uri(params = {})
11
- params[:response_type] ||= :code
12
11
  params[:scope] = setup_required_scope params[:scope]
13
12
  super
14
13
  end
@@ -14,14 +14,14 @@ Gem::Specification.new do |s|
14
14
  s.require_paths = ["lib"]
15
15
  s.add_runtime_dependency "json", ">= 1.4.3"
16
16
  s.add_runtime_dependency "tzinfo"
17
- s.add_runtime_dependency "attr_required", ">= 0.0.5"
17
+ s.add_runtime_dependency "attr_required", ">= 1.0.0"
18
18
  s.add_runtime_dependency "activemodel"
19
19
  s.add_runtime_dependency "validate_url"
20
20
  s.add_runtime_dependency "validate_email"
21
- s.add_runtime_dependency "json-jwt", ">= 0.5.5"
22
- s.add_runtime_dependency "swd", ">= 0.1.2"
23
- s.add_runtime_dependency "webfinger", ">= 0.0.2"
24
- s.add_runtime_dependency "rack-oauth2", ">= 1.0.0"
21
+ s.add_runtime_dependency "json-jwt", ">= 1.2.1"
22
+ s.add_runtime_dependency "swd", ">= 1.0.0"
23
+ s.add_runtime_dependency "webfinger", ">= 1.0.1"
24
+ s.add_runtime_dependency "rack-oauth2", ">= 1.2.1"
25
25
  s.add_development_dependency "rake"
26
26
  s.add_development_dependency "rspec"
27
27
  s.add_development_dependency "rspec-its"
@@ -34,16 +34,51 @@ describe OpenIDConnect::Client do
34
34
  end
35
35
 
36
36
  describe '#authorization_uri' do
37
- describe 'scope' do
37
+ let(:scope) { nil }
38
+ let(:response_type) { nil }
39
+ let(:query) do
40
+ params = {
41
+ scope: scope,
42
+ response_type: response_type
43
+ }.reject do |k,v|
44
+ v.blank?
45
+ end
46
+ query = URI.parse(client.authorization_uri params).query
47
+ Rack::Utils.parse_query(query).with_indifferent_access
48
+ end
49
+ let :attributes do
50
+ required_attributes.merge(
51
+ host: 'server.example.com'
52
+ )
53
+ end
54
+
55
+ describe 'response_type' do
38
56
  subject do
39
- query = URI.parse(client.authorization_uri scope: scope).query
40
- Rack::Utils.parse_query(query).with_indifferent_access[:scope]
57
+ query[:response_type]
41
58
  end
42
- let(:scope) { nil }
43
- let :attributes do
44
- required_attributes.merge(
45
- host: 'server.example.com'
46
- )
59
+
60
+ it { should == 'code' }
61
+
62
+ context 'when response_type is given' do
63
+ context 'when array given' do
64
+ let(:response_type) { [:code, :token] }
65
+ it { should == 'code token' }
66
+ end
67
+
68
+ context 'when scalar given' do
69
+ let(:response_type) { :token }
70
+ it { should == 'token' }
71
+ end
72
+ end
73
+
74
+ context 'as default' do
75
+ it { should == 'code' }
76
+ end
77
+ end
78
+
79
+ describe 'scope' do
80
+ subject do
81
+ query[:scope]
47
82
  end
48
83
 
49
84
  context 'when scope is given' do
@@ -58,7 +93,7 @@ describe OpenIDConnect::Client do
58
93
  end
59
94
  end
60
95
 
61
- context 'otherwise' do
96
+ context 'as default' do
62
97
  it { should == 'openid' }
63
98
  end
64
99
  end
@@ -232,6 +232,7 @@ describe OpenIDConnect::ResponseObject::IdToken do
232
232
  its(key) { should == attributes[key] }
233
233
  end
234
234
  its(:exp) { should == attributes[:exp].to_i }
235
+ its(:raw_attributes) { should be_instance_of JSON::JWT }
235
236
 
236
237
  context 'when self-issued' do
237
238
  context 'when valid' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openid_connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.3
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - nov matake
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-12 00:00:00.000000000 Z
11
+ date: 2015-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 0.0.5
47
+ version: 1.0.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 0.0.5
54
+ version: 1.0.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: activemodel
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -100,56 +100,56 @@ dependencies:
100
100
  requirements:
101
101
  - - ">="
102
102
  - !ruby/object:Gem::Version
103
- version: 0.5.5
103
+ version: 1.2.1
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
- version: 0.5.5
110
+ version: 1.2.1
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: swd
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - ">="
116
116
  - !ruby/object:Gem::Version
117
- version: 0.1.2
117
+ version: 1.0.0
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
- version: 0.1.2
124
+ version: 1.0.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: webfinger
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - ">="
130
130
  - !ruby/object:Gem::Version
131
- version: 0.0.2
131
+ version: 1.0.1
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
- version: 0.0.2
138
+ version: 1.0.1
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: rack-oauth2
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - ">="
144
144
  - !ruby/object:Gem::Version
145
- version: 1.0.0
145
+ version: 1.2.1
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - ">="
151
151
  - !ruby/object:Gem::Version
152
- version: 1.0.0
152
+ version: 1.2.1
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: rake
155
155
  requirement: !ruby/object:Gem::Requirement