openid_connect 0.1.5 → 0.2.0.alpha
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +2 -2
- data/VERSION +1 -1
- data/lib/openid_connect.rb +2 -1
- data/lib/openid_connect/connect_object.rb +46 -0
- data/lib/openid_connect/jwtnizable.rb +12 -0
- data/lib/openid_connect/request_object.rb +44 -0
- data/lib/openid_connect/request_object/claimable.rb +48 -0
- data/lib/openid_connect/request_object/id_token.rb +8 -0
- data/lib/openid_connect/request_object/user_info.rb +7 -0
- data/lib/openid_connect/response_object.rb +1 -40
- data/lib/openid_connect/response_object/id_token.rb +2 -10
- data/lib/openid_connect/response_object/user_info/open_id.rb +1 -1
- data/lib/openid_connect/response_object/user_info/open_id/address.rb +1 -1
- data/spec/helpers/webmock_helper.rb +3 -0
- data/spec/openid_connect/client_spec.rb +10 -6
- data/spec/openid_connect/{response_object_spec.rb → connect_object_spec.rb} +3 -3
- data/spec/openid_connect/request_object_spec.rb +108 -0
- metadata +41 -33
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
openid_connect (0.1.
|
4
|
+
openid_connect (0.1.5)
|
5
5
|
activemodel (>= 3)
|
6
6
|
attr_required (>= 0.0.5)
|
7
7
|
json (>= 1.4.3)
|
@@ -52,7 +52,7 @@ GEM
|
|
52
52
|
multi_json (1.1.0)
|
53
53
|
polyglot (0.3.3)
|
54
54
|
rack (1.4.1)
|
55
|
-
rack-oauth2 (0.14.
|
55
|
+
rack-oauth2 (0.14.4)
|
56
56
|
activesupport (>= 2.3)
|
57
57
|
attr_required (>= 0.0.5)
|
58
58
|
httpclient (>= 2.2.0.2)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0.alpha
|
data/lib/openid_connect.rb
CHANGED
@@ -69,6 +69,7 @@ end
|
|
69
69
|
require 'openid_connect/exception'
|
70
70
|
require 'openid_connect/client'
|
71
71
|
require 'openid_connect/access_token'
|
72
|
-
require 'openid_connect/
|
72
|
+
require 'openid_connect/jwtnizable'
|
73
|
+
require 'openid_connect/connect_object'
|
73
74
|
require 'openid_connect/discovery'
|
74
75
|
require 'openid_connect/debugger'
|
@@ -0,0 +1,46 @@
|
|
1
|
+
module OpenIDConnect
|
2
|
+
class ConnectObject
|
3
|
+
include ActiveModel::Validations, AttrRequired, AttrOptional
|
4
|
+
|
5
|
+
def initialize(attributes = {})
|
6
|
+
all_attributes.each do |_attr_|
|
7
|
+
self.send :"#{_attr_}=", attributes[_attr_]
|
8
|
+
end
|
9
|
+
attr_missing!
|
10
|
+
end
|
11
|
+
|
12
|
+
def all_attributes
|
13
|
+
required_attributes + optional_attributes
|
14
|
+
end
|
15
|
+
|
16
|
+
def require_at_least_one_attributes
|
17
|
+
all_blank = all_attributes.all? do |key|
|
18
|
+
self.send(key).blank?
|
19
|
+
end
|
20
|
+
errors.add :base, 'At least one attribute is required' if all_blank
|
21
|
+
end
|
22
|
+
|
23
|
+
def as_json(options = {})
|
24
|
+
options ||= {} # options can be nil when to_json is called without options
|
25
|
+
validate! unless options[:skip_validation]
|
26
|
+
all_attributes.inject({}) do |hash, _attr_|
|
27
|
+
value = self.send(_attr_)
|
28
|
+
hash.merge! _attr_ => case value
|
29
|
+
when ConnectObject
|
30
|
+
value.as_json options
|
31
|
+
else
|
32
|
+
value
|
33
|
+
end
|
34
|
+
end.delete_if do |key, value|
|
35
|
+
value.nil?
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def validate!
|
40
|
+
valid? or raise ValidationFailed.new(self)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
require 'openid_connect/request_object'
|
46
|
+
require 'openid_connect/response_object'
|
@@ -0,0 +1,44 @@
|
|
1
|
+
module OpenIDConnect
|
2
|
+
class RequestObject < ConnectObject
|
3
|
+
attr_optional :client_id, :response_type, :redirect_uri, :scope, :state, :nonce, :display, :prompt, :user_info, :id_token
|
4
|
+
validate :require_at_least_one_attributes
|
5
|
+
|
6
|
+
def initialize(attributes = {})
|
7
|
+
attributes[:user_info] ||= attributes[:userinfo]
|
8
|
+
super attributes
|
9
|
+
end
|
10
|
+
|
11
|
+
def id_token=(attributes = {})
|
12
|
+
@id_token = IdToken.new(attributes) if attributes.present?
|
13
|
+
end
|
14
|
+
|
15
|
+
def user_info=(attributes = {})
|
16
|
+
@user_info = UserInfo.new(attributes) if attributes.present?
|
17
|
+
end
|
18
|
+
|
19
|
+
def as_json_with_user_info(options = {})
|
20
|
+
hash = as_json_without_user_info options
|
21
|
+
if hash.include?(:user_info)
|
22
|
+
hash[:userinfo] = hash.delete(:user_info)
|
23
|
+
end
|
24
|
+
hash
|
25
|
+
end
|
26
|
+
alias_method_chain :as_json, :user_info
|
27
|
+
|
28
|
+
include JWTnizable
|
29
|
+
class << self
|
30
|
+
def decode(jwt_string, key)
|
31
|
+
new JSON::JWT.decode(jwt_string, key)
|
32
|
+
end
|
33
|
+
|
34
|
+
def fetch(request_uri, key)
|
35
|
+
jwt_string = OpenIDConnect.http_client.get_content(request_uri)
|
36
|
+
decode jwt_string, key
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
require 'openid_connect/request_object/claimable'
|
43
|
+
require 'openid_connect/request_object/id_token'
|
44
|
+
require 'openid_connect/request_object/user_info'
|
@@ -0,0 +1,48 @@
|
|
1
|
+
module OpenIDConnect
|
2
|
+
class RequestObject
|
3
|
+
module Claimable
|
4
|
+
def self.included(klass)
|
5
|
+
klass.send :attr_optional, :claims
|
6
|
+
klass.send :alias_method_chain, :initialize, :claims
|
7
|
+
klass.send :alias_method_chain, :as_json, :keep_blank
|
8
|
+
end
|
9
|
+
|
10
|
+
def initialize_with_claims(attributes = {})
|
11
|
+
initialize_without_claims attributes
|
12
|
+
if claims.present?
|
13
|
+
claims.each do |key, value|
|
14
|
+
case value
|
15
|
+
when :optional
|
16
|
+
claims[key] = {
|
17
|
+
:optional => true
|
18
|
+
}
|
19
|
+
when :required
|
20
|
+
claims[key] = nil
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def as_json_with_keep_blank(options = {})
|
27
|
+
keys = claims.try(:keys)
|
28
|
+
hash = as_json_without_keep_blank options
|
29
|
+
Array(keys).each do |key|
|
30
|
+
hash[:claims][key] ||= nil
|
31
|
+
end
|
32
|
+
hash
|
33
|
+
end
|
34
|
+
|
35
|
+
def required?(claim)
|
36
|
+
accessible?(claim) && !optional?(claim)
|
37
|
+
end
|
38
|
+
|
39
|
+
def optional?(claim)
|
40
|
+
accessible?(claim) && claims[claim].is_a?(Hash) && claims[claim][:optional]
|
41
|
+
end
|
42
|
+
|
43
|
+
def accessible?(claim)
|
44
|
+
claims.try(:[], claim)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -1,44 +1,5 @@
|
|
1
1
|
module OpenIDConnect
|
2
|
-
class ResponseObject
|
3
|
-
include ActiveModel::Validations, AttrRequired, AttrOptional
|
4
|
-
|
5
|
-
def initialize(attributes = {})
|
6
|
-
all_attributes.each do |_attr_|
|
7
|
-
self.send :"#{_attr_}=", attributes[_attr_]
|
8
|
-
end
|
9
|
-
attr_missing!
|
10
|
-
end
|
11
|
-
|
12
|
-
def all_attributes
|
13
|
-
required_attributes + optional_attributes
|
14
|
-
end
|
15
|
-
|
16
|
-
def require_at_least_one_attributes
|
17
|
-
all_blank = all_attributes.all? do |key|
|
18
|
-
self.send(key).blank?
|
19
|
-
end
|
20
|
-
errors.add :base, 'At least one attribute is required' if all_blank
|
21
|
-
end
|
22
|
-
|
23
|
-
def as_json(options = {})
|
24
|
-
options ||= {} # options can be nil when to_json is called without options
|
25
|
-
validate! unless options[:skip_validation]
|
26
|
-
all_attributes.inject({}) do |hash, _attr_|
|
27
|
-
value = self.send(_attr_)
|
28
|
-
hash.merge! _attr_ => case value
|
29
|
-
when ResponseObject
|
30
|
-
value.as_json
|
31
|
-
else
|
32
|
-
value
|
33
|
-
end
|
34
|
-
end.delete_if do |key, value|
|
35
|
-
value.nil?
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
def validate!
|
40
|
-
valid? or raise ValidationFailed.new(self)
|
41
|
-
end
|
2
|
+
class ResponseObject < ConnectObject
|
42
3
|
end
|
43
4
|
end
|
44
5
|
|
@@ -2,7 +2,7 @@ require 'json/jwt'
|
|
2
2
|
|
3
3
|
module OpenIDConnect
|
4
4
|
class ResponseObject
|
5
|
-
class IdToken <
|
5
|
+
class IdToken < ConnectObject
|
6
6
|
class InvalidToken < Exception; end
|
7
7
|
|
8
8
|
attr_required :iss, :user_id, :aud, :exp, :nonce
|
@@ -26,15 +26,7 @@ module OpenIDConnect
|
|
26
26
|
raise InvalidToken.new('Invalid ID Token')
|
27
27
|
end
|
28
28
|
|
29
|
-
|
30
|
-
token = JSON::JWT.new as_json
|
31
|
-
yield token if block_given?
|
32
|
-
if algorithm != :none
|
33
|
-
token = token.sign key, algorithm
|
34
|
-
end
|
35
|
-
token.to_s
|
36
|
-
end
|
37
|
-
|
29
|
+
include JWTnizable
|
38
30
|
class << self
|
39
31
|
def decode(jwt_string, key_or_client)
|
40
32
|
case key_or_client
|
@@ -2,7 +2,7 @@ module OpenIDConnect
|
|
2
2
|
class ResponseObject
|
3
3
|
module UserInfo
|
4
4
|
class OpenID
|
5
|
-
class Address <
|
5
|
+
class Address < ConnectObject
|
6
6
|
attr_optional :formatted, :street_address, :locality, :region, :postal_code, :country
|
7
7
|
validate :require_at_least_one_attributes
|
8
8
|
end
|
@@ -74,12 +74,16 @@ describe OpenIDConnect::Client do
|
|
74
74
|
end
|
75
75
|
let :protocol_params do
|
76
76
|
{
|
77
|
-
:client_id => 'client_id',
|
78
|
-
:client_secret => 'client_secret',
|
79
77
|
:grant_type => 'authorization_code',
|
80
78
|
:code => 'code'
|
81
79
|
}
|
82
80
|
end
|
81
|
+
let :header_params do
|
82
|
+
{
|
83
|
+
'Authorization' => 'Basic Y2xpZW50X2lkOmNsaWVudF9zZWNyZXQ=',
|
84
|
+
'Content-Type' => 'application/x-www-form-urlencoded'
|
85
|
+
}
|
86
|
+
end
|
83
87
|
let :access_token do
|
84
88
|
client.authorization_code = 'code'
|
85
89
|
client.access_token!
|
@@ -87,14 +91,14 @@ describe OpenIDConnect::Client do
|
|
87
91
|
|
88
92
|
context 'when bearer token is returned' do
|
89
93
|
it 'should return OpenIDConnect::AccessToken' do
|
90
|
-
mock_json :post, client.token_endpoint, 'access_token/bearer', :params => protocol_params do
|
94
|
+
mock_json :post, client.token_endpoint, 'access_token/bearer', :request_header => header_params, :params => protocol_params do
|
91
95
|
access_token.should be_a OpenIDConnect::AccessToken
|
92
96
|
end
|
93
97
|
end
|
94
98
|
|
95
99
|
context 'when id_token is returned' do
|
96
100
|
it 'should include id_token' do
|
97
|
-
mock_json :post, client.token_endpoint, 'access_token/bearer_with_id_token', :params => protocol_params do
|
101
|
+
mock_json :post, client.token_endpoint, 'access_token/bearer_with_id_token', :request_header => header_params, :params => protocol_params do
|
98
102
|
access_token.id_token.should == 'id_token'
|
99
103
|
end
|
100
104
|
end
|
@@ -103,7 +107,7 @@ describe OpenIDConnect::Client do
|
|
103
107
|
|
104
108
|
context 'when invalid JSON is returned' do
|
105
109
|
it 'should raise OpenIDConnect::Exception' do
|
106
|
-
mock_json :post, client.token_endpoint, 'access_token/invalid_json', :params => protocol_params do
|
110
|
+
mock_json :post, client.token_endpoint, 'access_token/invalid_json', :request_header => header_params, :params => protocol_params do
|
107
111
|
expect do
|
108
112
|
access_token
|
109
113
|
end.should raise_error OpenIDConnect::Exception, 'Unknown Token Type'
|
@@ -113,7 +117,7 @@ describe OpenIDConnect::Client do
|
|
113
117
|
|
114
118
|
context 'otherwise' do
|
115
119
|
it 'should raise Unexpected Token Type exception' do
|
116
|
-
mock_json :post, client.token_endpoint, 'access_token/mac', :params => protocol_params do
|
120
|
+
mock_json :post, client.token_endpoint, 'access_token/mac', :request_header => header_params, :params => protocol_params do
|
117
121
|
expect { access_token }.should raise_error OpenIDConnect::Exception, 'Unexpected Token Type: mac'
|
118
122
|
end
|
119
123
|
end
|
@@ -1,14 +1,14 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe OpenIDConnect::
|
4
|
-
class OpenIDConnect::
|
3
|
+
describe OpenIDConnect::ConnectObject do
|
4
|
+
class OpenIDConnect::ConnectObject::SubClass < OpenIDConnect::ConnectObject
|
5
5
|
attr_required :required
|
6
6
|
attr_optional :optional
|
7
7
|
validates :required, :inclusion => {:in => ['Required', 'required']}, :length => 1..10
|
8
8
|
end
|
9
9
|
|
10
10
|
subject { instance }
|
11
|
-
let(:klass) { OpenIDConnect::
|
11
|
+
let(:klass) { OpenIDConnect::ConnectObject::SubClass }
|
12
12
|
let(:instance) { klass.new attributes }
|
13
13
|
let :attributes do
|
14
14
|
{:required => 'Required', :optional => 'Optional'}
|
@@ -0,0 +1,108 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe OpenIDConnect::RequestObject do
|
4
|
+
subject { request_object }
|
5
|
+
let(:request_object) { OpenIDConnect::RequestObject.new attributes }
|
6
|
+
|
7
|
+
context 'with all attributes' do
|
8
|
+
let(:attributes) do
|
9
|
+
{
|
10
|
+
:client_id => 'client_id',
|
11
|
+
:response_type => 'token id_token',
|
12
|
+
:redirect_uri => 'https://client.example.com',
|
13
|
+
:scope => 'openid email',
|
14
|
+
:state => 'state1234',
|
15
|
+
:nonce => 'nonce1234',
|
16
|
+
:display => :touch,
|
17
|
+
:prompt => :none,
|
18
|
+
:userinfo => {
|
19
|
+
:claims => {
|
20
|
+
:name => :required,
|
21
|
+
:email => :optional
|
22
|
+
}
|
23
|
+
},
|
24
|
+
:id_token => {
|
25
|
+
:max_age => 10,
|
26
|
+
:claims => {
|
27
|
+
:acr => {
|
28
|
+
:values => [2, 3, 4]
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}
|
32
|
+
}
|
33
|
+
end
|
34
|
+
let(:jwtnized) do
|
35
|
+
'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJjbGllbnRfaWQiOiJjbGllbnRfaWQiLCJyZXNwb25zZV90eXBlIjoidG9rZW4gaWRfdG9rZW4iLCJyZWRpcmVjdF91cmkiOiJodHRwczovL2NsaWVudC5leGFtcGxlLmNvbSIsInNjb3BlIjoib3BlbmlkIGVtYWlsIiwic3RhdGUiOiJzdGF0ZTEyMzQiLCJub25jZSI6Im5vbmNlMTIzNCIsImRpc3BsYXkiOiJ0b3VjaCIsInByb21wdCI6Im5vbmUiLCJpZF90b2tlbiI6eyJjbGFpbXMiOnsiYWNyIjp7InZhbHVlcyI6WzIsMyw0XX19LCJtYXhfYWdlIjoxMH0sInVzZXJpbmZvIjp7ImNsYWltcyI6eyJuYW1lIjpudWxsLCJlbWFpbCI6eyJvcHRpb25hbCI6dHJ1ZX19fX0.fdwSNB3TSnxpRZR6QwXTDb7PtBiPkk6ozN6ABZcoGxc'
|
36
|
+
end
|
37
|
+
let(:jsonized) do
|
38
|
+
{
|
39
|
+
:client_id => "client_id",
|
40
|
+
:response_type => "token id_token",
|
41
|
+
:redirect_uri => "https://client.example.com",
|
42
|
+
:scope => "openid email",
|
43
|
+
:state => "state1234",
|
44
|
+
:nonce => "nonce1234",
|
45
|
+
:display => :touch,
|
46
|
+
:prompt => :none,
|
47
|
+
:id_token => {
|
48
|
+
:claims => {
|
49
|
+
:acr => {
|
50
|
+
:values => [2, 3, 4]
|
51
|
+
}
|
52
|
+
},
|
53
|
+
:max_age => 10
|
54
|
+
},
|
55
|
+
:userinfo => {
|
56
|
+
:claims => {
|
57
|
+
:name => nil,
|
58
|
+
:email => {
|
59
|
+
:optional => true
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
64
|
+
end
|
65
|
+
it { should be_valid }
|
66
|
+
its(:as_json) do
|
67
|
+
should == jsonized
|
68
|
+
end
|
69
|
+
|
70
|
+
describe '#to_jwt' do
|
71
|
+
it do
|
72
|
+
request_object.to_jwt('secret', :HS256).should == jwtnized
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
describe '.decode' do
|
77
|
+
it do
|
78
|
+
OpenIDConnect::RequestObject.decode(jwtnized, 'secret').to_json.should == jsonized.to_json
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
describe '#required?' do
|
83
|
+
it do
|
84
|
+
request_object.user_info.required?(:name).should be_true
|
85
|
+
request_object.user_info.optional?(:name).should be_false
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
describe '#optional' do
|
90
|
+
it do
|
91
|
+
request_object.user_info.required?(:email).should be_false
|
92
|
+
request_object.user_info.optional?(:email).should be_true
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
context 'with no attributes' do
|
98
|
+
let(:attributes) do
|
99
|
+
{}
|
100
|
+
end
|
101
|
+
it { should_not be_valid }
|
102
|
+
it do
|
103
|
+
expect do
|
104
|
+
request_object.as_json
|
105
|
+
end.should raise_error OpenIDConnect::ValidationFailed
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
metadata
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openid_connect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.2.0.alpha
|
5
|
+
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- nov matake
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-02-
|
12
|
+
date: 2012-02-29 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|
16
|
-
requirement: &
|
16
|
+
requirement: &70330917356120 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 1.4.3
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70330917356120
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: tzinfo
|
27
|
-
requirement: &
|
27
|
+
requirement: &70330917355700 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70330917355700
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: attr_required
|
38
|
-
requirement: &
|
38
|
+
requirement: &70330912901500 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 0.0.5
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70330912901500
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: activemodel
|
49
|
-
requirement: &
|
49
|
+
requirement: &70330912901000 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '3'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70330912901000
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: validate_url
|
60
|
-
requirement: &
|
60
|
+
requirement: &70330912900620 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70330912900620
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: validate_email
|
71
|
-
requirement: &
|
71
|
+
requirement: &70330912900160 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70330912900160
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: json-jwt
|
82
|
-
requirement: &
|
82
|
+
requirement: &70330912899660 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: 0.0.3
|
88
88
|
type: :runtime
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70330912899660
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: swd
|
93
|
-
requirement: &
|
93
|
+
requirement: &70330912899160 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: 0.1.2
|
99
99
|
type: :runtime
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *70330912899160
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: rack-oauth2
|
104
|
-
requirement: &
|
104
|
+
requirement: &70330912898700 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ! '>='
|
@@ -109,10 +109,10 @@ dependencies:
|
|
109
109
|
version: 0.14.2
|
110
110
|
type: :runtime
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *70330912898700
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: rake
|
115
|
-
requirement: &
|
115
|
+
requirement: &70330912898240 !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|
118
118
|
- - ! '>='
|
@@ -120,10 +120,10 @@ dependencies:
|
|
120
120
|
version: '0.8'
|
121
121
|
type: :development
|
122
122
|
prerelease: false
|
123
|
-
version_requirements: *
|
123
|
+
version_requirements: *70330912898240
|
124
124
|
- !ruby/object:Gem::Dependency
|
125
125
|
name: cover_me
|
126
|
-
requirement: &
|
126
|
+
requirement: &70330912897760 !ruby/object:Gem::Requirement
|
127
127
|
none: false
|
128
128
|
requirements:
|
129
129
|
- - ! '>='
|
@@ -131,10 +131,10 @@ dependencies:
|
|
131
131
|
version: 1.2.0
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
|
-
version_requirements: *
|
134
|
+
version_requirements: *70330912897760
|
135
135
|
- !ruby/object:Gem::Dependency
|
136
136
|
name: rspec
|
137
|
-
requirement: &
|
137
|
+
requirement: &70330912897300 !ruby/object:Gem::Requirement
|
138
138
|
none: false
|
139
139
|
requirements:
|
140
140
|
- - ! '>='
|
@@ -142,10 +142,10 @@ dependencies:
|
|
142
142
|
version: '2'
|
143
143
|
type: :development
|
144
144
|
prerelease: false
|
145
|
-
version_requirements: *
|
145
|
+
version_requirements: *70330912897300
|
146
146
|
- !ruby/object:Gem::Dependency
|
147
147
|
name: webmock
|
148
|
-
requirement: &
|
148
|
+
requirement: &70330912896840 !ruby/object:Gem::Requirement
|
149
149
|
none: false
|
150
150
|
requirements:
|
151
151
|
- - ! '>='
|
@@ -153,7 +153,7 @@ dependencies:
|
|
153
153
|
version: 1.6.2
|
154
154
|
type: :development
|
155
155
|
prerelease: false
|
156
|
-
version_requirements: *
|
156
|
+
version_requirements: *70330912896840
|
157
157
|
description: OpenID Connect Server & Client Library
|
158
158
|
email:
|
159
159
|
- nov@matake.jp
|
@@ -174,6 +174,7 @@ files:
|
|
174
174
|
- lib/openid_connect/access_token.rb
|
175
175
|
- lib/openid_connect/client.rb
|
176
176
|
- lib/openid_connect/client/registrar.rb
|
177
|
+
- lib/openid_connect/connect_object.rb
|
177
178
|
- lib/openid_connect/debugger.rb
|
178
179
|
- lib/openid_connect/debugger/request_filter.rb
|
179
180
|
- lib/openid_connect/discovery.rb
|
@@ -186,6 +187,11 @@ files:
|
|
186
187
|
- lib/openid_connect/discovery/provider/config/resource.rb
|
187
188
|
- lib/openid_connect/discovery/provider/config/response.rb
|
188
189
|
- lib/openid_connect/exception.rb
|
190
|
+
- lib/openid_connect/jwtnizable.rb
|
191
|
+
- lib/openid_connect/request_object.rb
|
192
|
+
- lib/openid_connect/request_object/claimable.rb
|
193
|
+
- lib/openid_connect/request_object/id_token.rb
|
194
|
+
- lib/openid_connect/request_object/user_info.rb
|
189
195
|
- lib/openid_connect/response_object.rb
|
190
196
|
- lib/openid_connect/response_object/id_token.rb
|
191
197
|
- lib/openid_connect/response_object/user_info.rb
|
@@ -216,6 +222,7 @@ files:
|
|
216
222
|
- spec/openid_connect/access_token_spec.rb
|
217
223
|
- spec/openid_connect/client/registrar_spec.rb
|
218
224
|
- spec/openid_connect/client_spec.rb
|
225
|
+
- spec/openid_connect/connect_object_spec.rb
|
219
226
|
- spec/openid_connect/debugger/request_filter_spec.rb
|
220
227
|
- spec/openid_connect/discovery/principal/email_spec.rb
|
221
228
|
- spec/openid_connect/discovery/principal/uri_spec.rb
|
@@ -225,10 +232,10 @@ files:
|
|
225
232
|
- spec/openid_connect/discovery/provider/config_spec.rb
|
226
233
|
- spec/openid_connect/discovery/provider_spec.rb
|
227
234
|
- spec/openid_connect/exception_spec.rb
|
235
|
+
- spec/openid_connect/request_object_spec.rb
|
228
236
|
- spec/openid_connect/response_object/id_token_spec.rb
|
229
237
|
- spec/openid_connect/response_object/user_info/open_id/address_spec.rb
|
230
238
|
- spec/openid_connect/response_object/user_info/open_id_spec.rb
|
231
|
-
- spec/openid_connect/response_object_spec.rb
|
232
239
|
- spec/openid_connect_spec.rb
|
233
240
|
- spec/rack/oauth2/server/authorize/extension/code_and_id_token_and_token_spec.rb
|
234
241
|
- spec/rack/oauth2/server/authorize/extension/code_and_id_token_spec.rb
|
@@ -252,9 +259,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
252
259
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
253
260
|
none: false
|
254
261
|
requirements:
|
255
|
-
- - ! '
|
262
|
+
- - ! '>'
|
256
263
|
- !ruby/object:Gem::Version
|
257
|
-
version:
|
264
|
+
version: 1.3.1
|
258
265
|
requirements: []
|
259
266
|
rubyforge_project:
|
260
267
|
rubygems_version: 1.8.12
|
@@ -280,6 +287,7 @@ test_files:
|
|
280
287
|
- spec/openid_connect/access_token_spec.rb
|
281
288
|
- spec/openid_connect/client/registrar_spec.rb
|
282
289
|
- spec/openid_connect/client_spec.rb
|
290
|
+
- spec/openid_connect/connect_object_spec.rb
|
283
291
|
- spec/openid_connect/debugger/request_filter_spec.rb
|
284
292
|
- spec/openid_connect/discovery/principal/email_spec.rb
|
285
293
|
- spec/openid_connect/discovery/principal/uri_spec.rb
|
@@ -289,10 +297,10 @@ test_files:
|
|
289
297
|
- spec/openid_connect/discovery/provider/config_spec.rb
|
290
298
|
- spec/openid_connect/discovery/provider_spec.rb
|
291
299
|
- spec/openid_connect/exception_spec.rb
|
300
|
+
- spec/openid_connect/request_object_spec.rb
|
292
301
|
- spec/openid_connect/response_object/id_token_spec.rb
|
293
302
|
- spec/openid_connect/response_object/user_info/open_id/address_spec.rb
|
294
303
|
- spec/openid_connect/response_object/user_info/open_id_spec.rb
|
295
|
-
- spec/openid_connect/response_object_spec.rb
|
296
304
|
- spec/openid_connect_spec.rb
|
297
305
|
- spec/rack/oauth2/server/authorize/extension/code_and_id_token_and_token_spec.rb
|
298
306
|
- spec/rack/oauth2/server/authorize/extension/code_and_id_token_spec.rb
|