openid_connect 0.7.1 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/TODOs +12 -0
- data/VERSION +1 -1
- data/lib/openid_connect/response_object/id_token.rb +2 -2
- data/spec/openid_connect/response_object/id_token_spec.rb +11 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a9b42e118d43b1f35fce93a90c49bd1eb61304d
|
4
|
+
data.tar.gz: 538bdd1e964b384dbea3856b064960f58e321c3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 216aca60ea5765778ffa3e35c76331ad6f54ef0de2d8f904c7e6a55824634e3b0223d69a1ce4f98172d1610fcf8ac346883bcecb46e458495bdc23cbe56a490c
|
7
|
+
data.tar.gz: 9bd00a662f0cdd45c6bfc7a87d9c0bde98bf9931894c9e998b4b59a04196db102d5c3de1584d220fba4f48f24af38a335fb3edbac6293802a395296acdc84721
|
data/TODOs
ADDED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.7.
|
1
|
+
0.7.2
|
@@ -13,7 +13,7 @@ module OpenIDConnect
|
|
13
13
|
|
14
14
|
def initialize(attributes = {})
|
15
15
|
super
|
16
|
-
(all_attributes - [:exp, :iat, :auth_time, :sub_jwk]).each do |key|
|
16
|
+
(all_attributes - [:aud, :exp, :iat, :auth_time, :sub_jwk]).each do |key|
|
17
17
|
self.send "#{key}=", self.send(key).try(:to_s)
|
18
18
|
end
|
19
19
|
end
|
@@ -21,7 +21,7 @@ module OpenIDConnect
|
|
21
21
|
def verify!(expected = {})
|
22
22
|
exp.to_i > Time.now.to_i &&
|
23
23
|
iss == expected[:issuer] &&
|
24
|
-
aud
|
24
|
+
Array(aud).include?(expected[:client_id]) && # aud(ience) can be a string or an array of strings
|
25
25
|
nonce == expected[:nonce] or
|
26
26
|
raise InvalidToken.new('Invalid ID Token')
|
27
27
|
end
|
@@ -31,6 +31,17 @@ describe OpenIDConnect::ResponseObject::IdToken do
|
|
31
31
|
).should be_true
|
32
32
|
end
|
33
33
|
|
34
|
+
context 'when aud(ience) is an array of identifiers' do
|
35
|
+
let(:client_id) { 'client_id' }
|
36
|
+
let(:attributes) { required_attributes.merge(aud: ['some_other_identifier', client_id]) }
|
37
|
+
it do
|
38
|
+
id_token.verify!(
|
39
|
+
issuer: attributes[:iss],
|
40
|
+
client_id: client_id
|
41
|
+
).should be_true
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
34
45
|
context 'when expired' do
|
35
46
|
let(:ext) { 10.minutes.ago }
|
36
47
|
it 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.7.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nov matake
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -220,6 +220,7 @@ files:
|
|
220
220
|
- LICENSE
|
221
221
|
- README.rdoc
|
222
222
|
- Rakefile
|
223
|
+
- TODOs
|
223
224
|
- VERSION
|
224
225
|
- lib/openid_connect.rb
|
225
226
|
- lib/openid_connect/access_token.rb
|