openid_connect 0.0.28 → 0.0.29
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +10 -6
- data/VERSION +1 -1
- data/lib/openid_connect/response_object/id_token.rb +8 -4
- data/openid_connect.gemspec +1 -1
- metadata +4 -4
data/Gemfile.lock
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
openid_connect (0.0.
|
4
|
+
openid_connect (0.0.28)
|
5
5
|
activemodel (>= 3)
|
6
6
|
attr_required (>= 0.0.3)
|
7
7
|
json (>= 1.4.3)
|
8
|
-
jwt (>= 0.
|
8
|
+
json-jwt (>= 0.0.3)
|
9
9
|
rack-oauth2 (>= 0.10.0)
|
10
10
|
swd (>= 0.0.6)
|
11
11
|
tzinfo
|
@@ -25,17 +25,20 @@ GEM
|
|
25
25
|
addressable (2.2.6)
|
26
26
|
attr_required (0.0.3)
|
27
27
|
bcrypt-ruby (3.0.1)
|
28
|
+
bcrypt-ruby (3.0.1-java)
|
28
29
|
bouncy-castle-java (1.5.0146.1)
|
29
30
|
builder (3.0.0)
|
30
|
-
crack (0.
|
31
|
+
crack (0.3.0)
|
31
32
|
diff-lcs (1.1.3)
|
32
33
|
httpclient (2.2.1)
|
33
34
|
i18n (0.6.0)
|
34
35
|
jruby-openssl (0.7.4)
|
35
36
|
bouncy-castle-java
|
36
37
|
json (1.6.1)
|
37
|
-
|
38
|
-
|
38
|
+
json (1.6.1-java)
|
39
|
+
json-jwt (0.0.3)
|
40
|
+
json (>= 1.4.3)
|
41
|
+
url_safe_base64
|
39
42
|
mail (2.3.0)
|
40
43
|
i18n (>= 0.4.0)
|
41
44
|
mime-types (~> 1.16)
|
@@ -43,7 +46,7 @@ GEM
|
|
43
46
|
mime-types (1.16)
|
44
47
|
multi_json (1.0.3)
|
45
48
|
polyglot (0.3.2)
|
46
|
-
rack (1.3.
|
49
|
+
rack (1.3.3)
|
47
50
|
rack-oauth2 (0.11.0)
|
48
51
|
activesupport (>= 2.3)
|
49
52
|
attr_required (>= 0.0.3)
|
@@ -72,6 +75,7 @@ GEM
|
|
72
75
|
polyglot
|
73
76
|
polyglot (>= 0.3.1)
|
74
77
|
tzinfo (0.3.29)
|
78
|
+
url_safe_base64 (0.2.1)
|
75
79
|
validate_email (0.1.5)
|
76
80
|
activemodel (>= 3.0)
|
77
81
|
mail (>= 2.2.5)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.29
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require 'jwt'
|
1
|
+
require 'json/jwt'
|
2
2
|
|
3
3
|
module OpenIDConnect
|
4
4
|
class ResponseObject
|
@@ -21,8 +21,12 @@ module OpenIDConnect
|
|
21
21
|
raise InvalidToken.new('Invalid audience or expired')
|
22
22
|
end
|
23
23
|
|
24
|
-
def to_jwt(key, algorithm =
|
25
|
-
JWT.
|
24
|
+
def to_jwt(key, algorithm = :RS256)
|
25
|
+
token = JSON::JWT.new as_json
|
26
|
+
if algorithm != :none
|
27
|
+
token = token.sign key, algorithm
|
28
|
+
end
|
29
|
+
token.to_s
|
26
30
|
end
|
27
31
|
|
28
32
|
class << self
|
@@ -33,7 +37,7 @@ module OpenIDConnect
|
|
33
37
|
http_client.post key_or_client.check_session_uri, :id_token => jwt_string
|
34
38
|
end
|
35
39
|
else
|
36
|
-
JWT.decode(jwt_string, key_or_client).with_indifferent_access
|
40
|
+
JSON::JWT.decode(jwt_string, key_or_client).with_indifferent_access
|
37
41
|
end
|
38
42
|
new attributes
|
39
43
|
end
|
data/openid_connect.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.add_runtime_dependency "activemodel", ">= 3"
|
17
17
|
s.add_runtime_dependency "validate_url"
|
18
18
|
s.add_runtime_dependency "validate_email"
|
19
|
-
s.add_runtime_dependency "jwt", ">= 0.
|
19
|
+
s.add_runtime_dependency "json-jwt", ">= 0.0.3"
|
20
20
|
s.add_runtime_dependency "swd", ">= 0.0.6"
|
21
21
|
s.add_runtime_dependency "rack-oauth2", ">= 0.10.0"
|
22
22
|
s.add_development_dependency "rake", ">= 0.8"
|
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.
|
5
|
+
version: 0.0.29
|
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-
|
13
|
+
date: 2011-09-21 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: json
|
@@ -79,14 +79,14 @@ dependencies:
|
|
79
79
|
type: :runtime
|
80
80
|
version_requirements: *id006
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
|
-
name: jwt
|
82
|
+
name: json-jwt
|
83
83
|
prerelease: false
|
84
84
|
requirement: &id007 !ruby/object:Gem::Requirement
|
85
85
|
none: false
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0.
|
89
|
+
version: 0.0.3
|
90
90
|
type: :runtime
|
91
91
|
version_requirements: *id007
|
92
92
|
- !ruby/object:Gem::Dependency
|