saml2 1.0.10 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +2 -7
- data/lib/saml2.rb +2 -0
- data/lib/saml2/attribute.rb +2 -0
- data/lib/saml2/attribute_consuming_service.rb +1 -0
- data/lib/saml2/authn_request.rb +19 -47
- data/lib/saml2/base.rb +5 -2
- data/lib/saml2/bindings.rb +7 -0
- data/lib/saml2/bindings/http_redirect.rb +141 -0
- data/lib/saml2/contact.rb +14 -16
- data/lib/saml2/endpoint.rb +5 -6
- data/lib/saml2/entity.rb +23 -18
- data/lib/saml2/identity_provider.rb +4 -4
- data/lib/saml2/indexed_object.rb +7 -3
- data/lib/saml2/key.rb +19 -1
- data/lib/saml2/logout_request.rb +43 -0
- data/lib/saml2/logout_response.rb +23 -0
- data/lib/saml2/message.rb +109 -0
- data/lib/saml2/name_id.rb +16 -8
- data/lib/saml2/organization_and_contacts.rb +2 -2
- data/lib/saml2/request.rb +8 -0
- data/lib/saml2/response.rb +7 -23
- data/lib/saml2/role.rb +2 -3
- data/lib/saml2/service_provider.rb +24 -2
- data/lib/saml2/sso.rb +2 -2
- data/lib/saml2/status.rb +28 -0
- data/lib/saml2/status_response.rb +33 -0
- data/lib/saml2/version.rb +1 -1
- data/spec/fixtures/identity_provider.xml +1 -0
- data/spec/fixtures/response_signed.xml +1 -1
- data/spec/fixtures/response_with_attribute_signed.xml +1 -1
- data/spec/lib/attribute_consuming_service_spec.rb +37 -37
- data/spec/lib/attribute_spec.rb +17 -17
- data/spec/lib/authn_request_spec.rb +15 -71
- data/spec/lib/bindings/http_redirect_spec.rb +151 -0
- data/spec/lib/conditions_spec.rb +10 -10
- data/spec/lib/entity_spec.rb +12 -12
- data/spec/lib/identity_provider_spec.rb +4 -4
- data/spec/lib/indexed_object_spec.rb +38 -7
- data/spec/lib/logout_request_spec.rb +31 -0
- data/spec/lib/logout_response_spec.rb +31 -0
- data/spec/lib/message_spec.rb +21 -0
- data/spec/lib/response_spec.rb +8 -9
- data/spec/lib/service_provider_spec.rb +29 -8
- data/spec/spec_helper.rb +0 -1
- metadata +41 -11
data/spec/lib/conditions_spec.rb
CHANGED
@@ -3,13 +3,13 @@ require_relative '../spec_helper'
|
|
3
3
|
module SAML2
|
4
4
|
describe Conditions do
|
5
5
|
it "empty should be valid" do
|
6
|
-
Conditions.new.valid
|
6
|
+
expect(Conditions.new.valid?).to eq :valid
|
7
7
|
end
|
8
8
|
|
9
9
|
it "should be valid with unknown condition" do
|
10
10
|
conditions = Conditions.new
|
11
11
|
conditions << Conditions::Condition.new
|
12
|
-
conditions.valid
|
12
|
+
expect(conditions.valid?).to eq :indeterminate
|
13
13
|
end
|
14
14
|
|
15
15
|
it "should be valid with timestamps" do
|
@@ -17,7 +17,7 @@ module SAML2
|
|
17
17
|
now = Time.now.utc
|
18
18
|
conditions.not_before = now - 5
|
19
19
|
conditions.not_on_or_after = now + 30
|
20
|
-
conditions.valid
|
20
|
+
expect(conditions.valid?).to eq :valid
|
21
21
|
end
|
22
22
|
|
23
23
|
it "should be invalid with out of range timestamps" do
|
@@ -25,7 +25,7 @@ module SAML2
|
|
25
25
|
now = Time.now.utc
|
26
26
|
conditions.not_before = now - 35
|
27
27
|
conditions.not_on_or_after = now - 5
|
28
|
-
conditions.valid
|
28
|
+
expect(conditions.valid?).to eq :invalid
|
29
29
|
end
|
30
30
|
|
31
31
|
it "should allow passing now" do
|
@@ -33,7 +33,7 @@ module SAML2
|
|
33
33
|
now = Time.now.utc
|
34
34
|
conditions.not_before = now - 35
|
35
35
|
conditions.not_on_or_after = now - 5
|
36
|
-
conditions.valid?(now: now - 10).
|
36
|
+
expect(conditions.valid?(now: now - 10)).to eq :valid
|
37
37
|
end
|
38
38
|
|
39
39
|
it "should be invalid before indeterminate" do
|
@@ -41,29 +41,29 @@ module SAML2
|
|
41
41
|
now = Time.now.utc
|
42
42
|
conditions.not_before = now + 5
|
43
43
|
conditions << Conditions::Condition.new
|
44
|
-
conditions.valid
|
44
|
+
expect(conditions.valid?).to eq :invalid
|
45
45
|
end
|
46
46
|
|
47
47
|
it "should be invalid before indeterminate (actual conditions)" do
|
48
48
|
conditions = Conditions.new
|
49
49
|
conditions << Conditions::Condition.new
|
50
50
|
conditions << Conditions::AudienceRestriction.new('audience')
|
51
|
-
conditions.valid
|
51
|
+
expect(conditions.valid?).to eq :invalid
|
52
52
|
end
|
53
53
|
|
54
54
|
end
|
55
55
|
|
56
56
|
describe Conditions::AudienceRestriction do
|
57
57
|
it "should be invalid" do
|
58
|
-
Conditions::AudienceRestriction.new('expected').valid?(audience: 'actual').
|
58
|
+
expect(Conditions::AudienceRestriction.new('expected').valid?(audience: 'actual')).to eq :invalid
|
59
59
|
end
|
60
60
|
|
61
61
|
it "should be valid" do
|
62
|
-
Conditions::AudienceRestriction.new('expected').valid?(audience: 'expected').
|
62
|
+
expect(Conditions::AudienceRestriction.new('expected').valid?(audience: 'expected')).to eq :valid
|
63
63
|
end
|
64
64
|
|
65
65
|
it "should be valid with an array" do
|
66
|
-
Conditions::AudienceRestriction.new(['expected', 'actual']).valid?(audience: 'actual').
|
66
|
+
expect(Conditions::AudienceRestriction.new(['expected', 'actual']).valid?(audience: 'actual')).to eq :valid
|
67
67
|
end
|
68
68
|
end
|
69
69
|
end
|
data/spec/lib/entity_spec.rb
CHANGED
@@ -4,45 +4,45 @@ module SAML2
|
|
4
4
|
describe Entity do
|
5
5
|
it "should parse and validate" do
|
6
6
|
entity = Entity.parse(fixture('service_provider.xml'))
|
7
|
-
entity.valid_schema
|
7
|
+
expect(entity.valid_schema?).to eq true
|
8
8
|
end
|
9
9
|
|
10
10
|
it "should return nil when not valid schema" do
|
11
11
|
entity = Entity.parse("<xml></xml>")
|
12
|
-
|
12
|
+
expect(entity).to be_nil
|
13
13
|
end
|
14
14
|
|
15
15
|
it "should return nil on non-XML" do
|
16
16
|
entity = Entity.parse("garbage")
|
17
|
-
|
17
|
+
expect(entity).to be_nil
|
18
18
|
end
|
19
19
|
|
20
20
|
describe "valid schema" do
|
21
21
|
let(:entity) { Entity.parse(fixture('service_provider.xml')) }
|
22
22
|
|
23
23
|
it "should find the id" do
|
24
|
-
entity.entity_id.
|
24
|
+
expect(entity.entity_id).to eq "http://siteadmin.instructure.com/saml2"
|
25
25
|
end
|
26
26
|
|
27
27
|
it "should parse the organization" do
|
28
|
-
entity.organization.display_name.
|
29
|
-
entity.organization.display_name('en').
|
30
|
-
|
31
|
-
entity.organization.display_name(:all).
|
28
|
+
expect(entity.organization.display_name).to eq 'Canvas'
|
29
|
+
expect(entity.organization.display_name('en')).to eq 'Canvas'
|
30
|
+
expect(entity.organization.display_name('es')).to be_nil
|
31
|
+
expect(entity.organization.display_name(:all)).to eq en: 'Canvas'
|
32
32
|
end
|
33
33
|
|
34
34
|
it "validates metadata from ADFS containing lots of non-SAML schemas" do
|
35
|
-
Entity.parse(fixture('FederationMetadata.xml')).valid_schema
|
35
|
+
expect(Entity.parse(fixture('FederationMetadata.xml')).valid_schema?).to eq true
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
39
|
describe Entity::Group do
|
40
40
|
it "should parse and validate" do
|
41
41
|
group = Entity.parse(fixture('entities.xml'))
|
42
|
-
group.
|
43
|
-
group.valid_schema
|
42
|
+
expect(group).to be_instance_of(Entity::Group)
|
43
|
+
expect(group.valid_schema?).to eq true
|
44
44
|
|
45
|
-
group.map(&:entity_id).
|
45
|
+
expect(group.map(&:entity_id)).to eq ['urn:entity1', 'urn:entity2']
|
46
46
|
end
|
47
47
|
end
|
48
48
|
end
|
@@ -17,7 +17,7 @@ module SAML2
|
|
17
17
|
idp.keys << Key.new('somedata', Key::Type::SIGNING)
|
18
18
|
|
19
19
|
entity.roles << idp
|
20
|
-
Schemas.metadata.validate(Nokogiri::XML(entity.to_s)).
|
20
|
+
expect(Schemas.metadata.validate(Nokogiri::XML(entity.to_s))).to eq []
|
21
21
|
end
|
22
22
|
|
23
23
|
describe "valid metadata" do
|
@@ -25,12 +25,12 @@ module SAML2
|
|
25
25
|
let(:idp) { entity.roles.first }
|
26
26
|
|
27
27
|
it "should create the single_sign_on_services array" do
|
28
|
-
idp.single_sign_on_services.length.
|
29
|
-
idp.single_sign_on_services.first.location.
|
28
|
+
expect(idp.single_sign_on_services.length).to eq 3
|
29
|
+
expect(idp.single_sign_on_services.first.location).to eq 'https://sso.school.edu/idp/profile/Shibboleth/SSO'
|
30
30
|
end
|
31
31
|
|
32
32
|
it "should find the signing certificate" do
|
33
|
-
idp.keys.first.x509.
|
33
|
+
expect(idp.keys.first.x509).to match(/MIIE8TCCA9mgAwIBAgIJAITusxON60cKMA0GCSqGSIb3DQEBBQUAMIGrMQswCQYD/)
|
34
34
|
end
|
35
35
|
end
|
36
36
|
end
|
@@ -1,22 +1,53 @@
|
|
1
1
|
require_relative '../spec_helper'
|
2
2
|
|
3
3
|
module SAML2
|
4
|
+
describe IndexedObject do
|
5
|
+
describe "#default?" do
|
6
|
+
it "always returns a boolean" do
|
7
|
+
acs = Endpoint::Indexed.new('a', 0)
|
8
|
+
expect(acs.default?).to eq false
|
9
|
+
expect(acs.default_defined?).to eq false
|
10
|
+
end
|
11
|
+
|
12
|
+
it "#default_defined? works" do
|
13
|
+
acs = Endpoint::Indexed.new('a', 0, false)
|
14
|
+
expect(acs.default?).to eq false
|
15
|
+
expect(acs.default_defined?).to eq true
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
context "serialization" do
|
20
|
+
it "doesn't include isDefault when it's nil" do
|
21
|
+
acs = Endpoint::Indexed.new('a', 0)
|
22
|
+
builder = double()
|
23
|
+
expect(builder).to receive(:[]).and_return(builder).ordered
|
24
|
+
expect(builder).to receive(:"AssertionConsumerService").ordered
|
25
|
+
expect(builder).to receive(:parent).and_return(builder).ordered
|
26
|
+
expect(builder).to receive(:children).and_return(builder).ordered
|
27
|
+
expect(builder).to receive(:last).and_return(builder).ordered
|
28
|
+
expect(builder).to receive(:[]=).with("index", 0).ordered
|
29
|
+
|
30
|
+
acs.build(builder,"AssertionConsumerService")
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
4
35
|
describe IndexedObject::Array do
|
5
36
|
it "should sort by index" do
|
6
37
|
acses = Endpoint::Indexed::Array.new(
|
7
38
|
[Endpoint::Indexed.new('b', 1),
|
8
39
|
Endpoint::Indexed.new('a', 0)])
|
9
|
-
acses.map(&:location).
|
40
|
+
expect(acses.map(&:location)).to eq ['a', 'b']
|
10
41
|
end
|
11
42
|
|
12
43
|
it "should be accessible by index" do
|
13
44
|
acses = Endpoint::Indexed::Array.new(
|
14
45
|
[Endpoint::Indexed.new('b', 3),
|
15
46
|
Endpoint::Indexed.new('a', 1)])
|
16
|
-
acses.map(&:location).
|
17
|
-
acses[1].location.
|
18
|
-
acses[3].location.
|
19
|
-
|
47
|
+
expect(acses.map(&:location)).to eq ['a', 'b']
|
48
|
+
expect(acses[1].location).to eq 'a'
|
49
|
+
expect(acses[3].location).to eq 'b'
|
50
|
+
expect(acses[0]).to be_nil
|
20
51
|
end
|
21
52
|
|
22
53
|
describe "#default" do
|
@@ -24,14 +55,14 @@ module SAML2
|
|
24
55
|
acses = Endpoint::Indexed::Array.new(
|
25
56
|
[Endpoint::Indexed.new('a', 0),
|
26
57
|
Endpoint::Indexed.new('b', 1)])
|
27
|
-
acses.default.location.
|
58
|
+
expect(acses.default.location).to eq 'a'
|
28
59
|
end
|
29
60
|
|
30
61
|
it "should default to a tagged default" do
|
31
62
|
acses = Endpoint::Indexed::Array.new(
|
32
63
|
[Endpoint::Indexed.new('a', 0),
|
33
64
|
Endpoint::Indexed.new('b', 1, true)])
|
34
|
-
acses.default.location.
|
65
|
+
expect(acses.default.location).to eq 'b'
|
35
66
|
end
|
36
67
|
end
|
37
68
|
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require_relative '../spec_helper'
|
2
|
+
|
3
|
+
module SAML2
|
4
|
+
describe LogoutRequest do
|
5
|
+
let(:idp) { Entity.parse(fixture('identity_provider.xml')).roles.first }
|
6
|
+
|
7
|
+
let(:logout_request) {
|
8
|
+
LogoutRequest.initiate(idp,
|
9
|
+
NameID.new('issuer'),
|
10
|
+
NameID.new('jacob',
|
11
|
+
name_qualifier: "a",
|
12
|
+
sp_name_qualifier: "b"),
|
13
|
+
"abc")
|
14
|
+
}
|
15
|
+
|
16
|
+
it "should generate valid XML" do
|
17
|
+
xml = logout_request.to_s
|
18
|
+
expect(Schemas.protocol.validate(Nokogiri::XML(xml))).to eq []
|
19
|
+
end
|
20
|
+
|
21
|
+
it "parses" do
|
22
|
+
# yup, I'm lazy
|
23
|
+
new_request = LogoutRequest.parse(logout_request.to_s)
|
24
|
+
expect(new_request.issuer.id).to eq 'issuer'
|
25
|
+
expect(new_request.name_id.id).to eq 'jacob'
|
26
|
+
expect(new_request.name_id.name_qualifier).to eq 'a'
|
27
|
+
expect(new_request.name_id.sp_name_qualifier).to eq 'b'
|
28
|
+
expect(new_request.session_index).to eq ['abc']
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require_relative '../spec_helper'
|
2
|
+
|
3
|
+
module SAML2
|
4
|
+
describe LogoutResponse do
|
5
|
+
let(:idp) { Entity.parse(fixture('identity_provider.xml')).roles.first }
|
6
|
+
|
7
|
+
let(:logout_request) {
|
8
|
+
LogoutRequest.initiate(idp,
|
9
|
+
NameID.new('issuer'),
|
10
|
+
NameID.new('jacob',
|
11
|
+
name_qualifier: "a",
|
12
|
+
sp_name_qualifier: "b"),
|
13
|
+
"abc")
|
14
|
+
}
|
15
|
+
let(:logout_response) {
|
16
|
+
LogoutResponse.respond_to(logout_request, idp, NameID.new('issuer2'))
|
17
|
+
}
|
18
|
+
|
19
|
+
it "should generate valid XML" do
|
20
|
+
xml = logout_response.to_s
|
21
|
+
expect(Schemas.protocol.validate(Nokogiri::XML(xml))).to eq []
|
22
|
+
end
|
23
|
+
|
24
|
+
it "parses" do
|
25
|
+
# yup, I'm lazy
|
26
|
+
new_response = LogoutResponse.parse(logout_response.to_s)
|
27
|
+
expect(new_response.issuer.id).to eq 'issuer2'
|
28
|
+
expect(new_response.status.code).to eq Status::SUCCESS
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require_relative '../spec_helper'
|
2
|
+
|
3
|
+
module SAML2
|
4
|
+
describe Message do
|
5
|
+
describe '.parse' do
|
6
|
+
it 'complains about invalid XML' do
|
7
|
+
expect { Message.parse("garbage") }.to raise_error(CorruptMessage)
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'complains about getting the wrong type if calling on a subclass, and you get a different type' do
|
11
|
+
expect { Response.parse(fixture('authnrequest.xml')) }.to raise_error(UnexpectedMessage)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
describe '.from_xml' do
|
16
|
+
it "complains about unknown messages" do
|
17
|
+
expect { Message.parse("<Garbage></Garbage>") }.to raise_error(UnknownMessage)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/spec/lib/response_spec.rb
CHANGED
@@ -11,15 +11,14 @@ module SAML2
|
|
11
11
|
end
|
12
12
|
|
13
13
|
let(:response) do
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
response
|
14
|
+
Response.respond_to(request,
|
15
|
+
NameID.new('issuer'),
|
16
|
+
NameID.new('jacob', NameID::Format::PERSISTENT))
|
18
17
|
end
|
19
18
|
|
20
19
|
it "should generate valid XML" do
|
21
20
|
xml = response.to_s
|
22
|
-
Schemas.protocol.validate(Nokogiri::XML(xml)).
|
21
|
+
expect(Schemas.protocol.validate(Nokogiri::XML(xml))).to eq []
|
23
22
|
end
|
24
23
|
|
25
24
|
def freeze_response
|
@@ -40,23 +39,23 @@ module SAML2
|
|
40
39
|
it "should generate a valid signature" do
|
41
40
|
freeze_response
|
42
41
|
response.sign(fixture('certificate.pem'), fixture('privatekey.key'))
|
43
|
-
Schemas.protocol.validate(response.to_xml).
|
42
|
+
expect(Schemas.protocol.validate(response.to_xml)).to eq []
|
44
43
|
# verifiable on the command line with:
|
45
44
|
# xmlsec1 --verify --pubkey-cert-pem certificate.pem --privkey-pem privatekey.key --id-attr:ID urn:oasis:names:tc:SAML:2.0:assertion:Assertion response_signed.xml
|
46
|
-
response.to_s.
|
45
|
+
expect(response.to_s).to eq fixture('response_signed.xml')
|
47
46
|
end
|
48
47
|
|
49
48
|
it "should generate a valid signature when attributes are present" do
|
50
49
|
freeze_response
|
51
50
|
response.assertions.first.statements << sp.attribute_consuming_services.default.create_statement('givenName' => 'cody')
|
52
51
|
response.sign(fixture('certificate.pem'), fixture('privatekey.key'))
|
53
|
-
response.to_s.
|
52
|
+
expect(response.to_s).to eq fixture('response_with_attribute_signed.xml')
|
54
53
|
end
|
55
54
|
|
56
55
|
it "should generate valid XML for IdP initiated response" do
|
57
56
|
response = Response.initiate(sp, NameID.new('issuer'),
|
58
57
|
NameID.new('jacob', NameID::Format::PERSISTENT))
|
59
|
-
Schemas.protocol.validate(Nokogiri::XML(response.to_s)).
|
58
|
+
expect(Schemas.protocol.validate(Nokogiri::XML(response.to_s))).to eq []
|
60
59
|
end
|
61
60
|
end
|
62
61
|
end
|
@@ -2,28 +2,49 @@ require_relative '../spec_helper'
|
|
2
2
|
|
3
3
|
module SAML2
|
4
4
|
describe ServiceProvider do
|
5
|
+
it "should serialize valid xml" do
|
6
|
+
entity = Entity.new
|
7
|
+
entity.entity_id = 'http://sso.canvaslms.com/SAML2'
|
8
|
+
entity.organization = Organization.new('Canvas', 'Canvas by Instructure', 'https://www.canvaslms.com/')
|
9
|
+
contact = Contact.new(Contact::Type::TECHNICAL)
|
10
|
+
contact.company = 'Instructure'
|
11
|
+
contact.email_addresses << 'mailto:ops@instructure.com'
|
12
|
+
entity.contacts << contact
|
13
|
+
|
14
|
+
sp = ServiceProvider.new
|
15
|
+
sp.single_logout_services << Endpoint.new('https://sso.canvaslms.com/SAML2/Logout',
|
16
|
+
Endpoint::Bindings::HTTP_REDIRECT)
|
17
|
+
sp.assertion_consumer_services << Endpoint::Indexed.new('https://sso.canvaslms.com/SAML2/Login1', 0)
|
18
|
+
sp.assertion_consumer_services << Endpoint::Indexed.new('https://sso.canvaslms.com/SAML2/Login2', 1)
|
19
|
+
sp.keys << Key.new('somedata', Key::Type::ENCRYPTION, [Key::EncryptionMethod.new])
|
20
|
+
sp.keys << Key.new('somedata', Key::Type::SIGNING)
|
21
|
+
|
22
|
+
entity.roles << sp
|
23
|
+
expect(Schemas.metadata.validate(Nokogiri::XML(entity.to_s))).to eq []
|
24
|
+
end
|
25
|
+
|
5
26
|
describe "valid metadata" do
|
6
27
|
let(:entity) { Entity.parse(fixture('service_provider.xml')) }
|
7
28
|
let(:sp) { entity.roles.first }
|
8
29
|
|
9
30
|
it "should create the assertion_consumer_services array" do
|
10
|
-
sp.assertion_consumer_services.length.
|
11
|
-
sp.assertion_consumer_services.map(&:index).
|
12
|
-
sp.assertion_consumer_services.first.location.
|
31
|
+
expect(sp.assertion_consumer_services.length).to eq 4
|
32
|
+
expect(sp.assertion_consumer_services.map(&:index)).to eq [0, 1, 2, 3]
|
33
|
+
expect(sp.assertion_consumer_services.first.location).to eq 'https://siteadmin.instructure.com/saml_consume'
|
13
34
|
end
|
14
35
|
|
15
36
|
it "should find the signing certificate" do
|
16
|
-
sp.signing_keys.first.x509.
|
37
|
+
expect(sp.signing_keys.first.x509).to match(/MIIE8TCCA9mgAwIBAgIJAITusxON60cKMA0GCSqGSIb3DQEBBQUAMIGrMQswCQYD/)
|
17
38
|
end
|
18
39
|
|
19
40
|
it "should load the organization" do
|
20
|
-
entity.organization.display_name.
|
41
|
+
expect(entity.organization.display_name).to eq 'Canvas'
|
21
42
|
end
|
22
43
|
|
23
44
|
it "should load contacts" do
|
24
|
-
entity.contacts.length.
|
25
|
-
entity.contacts.first.type.
|
26
|
-
entity.contacts.first.surname.
|
45
|
+
expect(entity.contacts.length).to eq 1
|
46
|
+
expect(entity.contacts.first.type).to eq Contact::Type::TECHNICAL
|
47
|
+
expect(entity.contacts.first.surname).to eq 'Administrator'
|
27
48
|
end
|
28
49
|
end
|
29
50
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: saml2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cody Cutrer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -70,34 +70,48 @@ dependencies:
|
|
70
70
|
- - "<"
|
71
71
|
- !ruby/object:Gem::Version
|
72
72
|
version: '5.1'
|
73
|
+
- !ruby/object:Gem::Dependency
|
74
|
+
name: byebug
|
75
|
+
requirement: !ruby/object:Gem::Requirement
|
76
|
+
requirements:
|
77
|
+
- - "~>"
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '9.0'
|
80
|
+
type: :development
|
81
|
+
prerelease: false
|
82
|
+
version_requirements: !ruby/object:Gem::Requirement
|
83
|
+
requirements:
|
84
|
+
- - "~>"
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: '9.0'
|
73
87
|
- !ruby/object:Gem::Dependency
|
74
88
|
name: rake
|
75
89
|
requirement: !ruby/object:Gem::Requirement
|
76
90
|
requirements:
|
77
|
-
- - "
|
91
|
+
- - "~>"
|
78
92
|
- !ruby/object:Gem::Version
|
79
|
-
version: '0'
|
93
|
+
version: '12.0'
|
80
94
|
type: :development
|
81
95
|
prerelease: false
|
82
96
|
version_requirements: !ruby/object:Gem::Requirement
|
83
97
|
requirements:
|
84
|
-
- - "
|
98
|
+
- - "~>"
|
85
99
|
- !ruby/object:Gem::Version
|
86
|
-
version: '0'
|
100
|
+
version: '12.0'
|
87
101
|
- !ruby/object:Gem::Dependency
|
88
|
-
name:
|
102
|
+
name: rspec
|
89
103
|
requirement: !ruby/object:Gem::Requirement
|
90
104
|
requirements:
|
91
|
-
- - "
|
105
|
+
- - "~>"
|
92
106
|
- !ruby/object:Gem::Version
|
93
|
-
version: '
|
107
|
+
version: '3.5'
|
94
108
|
type: :development
|
95
109
|
prerelease: false
|
96
110
|
version_requirements: !ruby/object:Gem::Requirement
|
97
111
|
requirements:
|
98
|
-
- - "
|
112
|
+
- - "~>"
|
99
113
|
- !ruby/object:Gem::Version
|
100
|
-
version: '
|
114
|
+
version: '3.5'
|
101
115
|
description: |2
|
102
116
|
The saml2 library is yet another SAML library for Ruby, with
|
103
117
|
an emphasis on _not_ re-implementing XML, especially XML Security,
|
@@ -122,6 +136,8 @@ files:
|
|
122
136
|
- lib/saml2/authn_request.rb
|
123
137
|
- lib/saml2/authn_statement.rb
|
124
138
|
- lib/saml2/base.rb
|
139
|
+
- lib/saml2/bindings.rb
|
140
|
+
- lib/saml2/bindings/http_redirect.rb
|
125
141
|
- lib/saml2/conditions.rb
|
126
142
|
- lib/saml2/contact.rb
|
127
143
|
- lib/saml2/endpoint.rb
|
@@ -130,15 +146,21 @@ files:
|
|
130
146
|
- lib/saml2/identity_provider.rb
|
131
147
|
- lib/saml2/indexed_object.rb
|
132
148
|
- lib/saml2/key.rb
|
149
|
+
- lib/saml2/logout_request.rb
|
150
|
+
- lib/saml2/logout_response.rb
|
151
|
+
- lib/saml2/message.rb
|
133
152
|
- lib/saml2/name_id.rb
|
134
153
|
- lib/saml2/namespaces.rb
|
135
154
|
- lib/saml2/organization.rb
|
136
155
|
- lib/saml2/organization_and_contacts.rb
|
156
|
+
- lib/saml2/request.rb
|
137
157
|
- lib/saml2/response.rb
|
138
158
|
- lib/saml2/role.rb
|
139
159
|
- lib/saml2/schemas.rb
|
140
160
|
- lib/saml2/service_provider.rb
|
141
161
|
- lib/saml2/sso.rb
|
162
|
+
- lib/saml2/status.rb
|
163
|
+
- lib/saml2/status_response.rb
|
142
164
|
- lib/saml2/subject.rb
|
143
165
|
- lib/saml2/version.rb
|
144
166
|
- schemas/MetadataExchange.xsd
|
@@ -166,10 +188,14 @@ files:
|
|
166
188
|
- spec/lib/attribute_consuming_service_spec.rb
|
167
189
|
- spec/lib/attribute_spec.rb
|
168
190
|
- spec/lib/authn_request_spec.rb
|
191
|
+
- spec/lib/bindings/http_redirect_spec.rb
|
169
192
|
- spec/lib/conditions_spec.rb
|
170
193
|
- spec/lib/entity_spec.rb
|
171
194
|
- spec/lib/identity_provider_spec.rb
|
172
195
|
- spec/lib/indexed_object_spec.rb
|
196
|
+
- spec/lib/logout_request_spec.rb
|
197
|
+
- spec/lib/logout_response_spec.rb
|
198
|
+
- spec/lib/message_spec.rb
|
173
199
|
- spec/lib/response_spec.rb
|
174
200
|
- spec/lib/service_provider_spec.rb
|
175
201
|
- spec/spec_helper.rb
|
@@ -210,10 +236,14 @@ test_files:
|
|
210
236
|
- spec/lib/attribute_consuming_service_spec.rb
|
211
237
|
- spec/lib/attribute_spec.rb
|
212
238
|
- spec/lib/authn_request_spec.rb
|
239
|
+
- spec/lib/bindings/http_redirect_spec.rb
|
213
240
|
- spec/lib/conditions_spec.rb
|
214
241
|
- spec/lib/entity_spec.rb
|
215
242
|
- spec/lib/identity_provider_spec.rb
|
216
243
|
- spec/lib/indexed_object_spec.rb
|
244
|
+
- spec/lib/logout_request_spec.rb
|
245
|
+
- spec/lib/logout_response_spec.rb
|
246
|
+
- spec/lib/message_spec.rb
|
217
247
|
- spec/lib/response_spec.rb
|
218
248
|
- spec/lib/service_provider_spec.rb
|
219
249
|
- spec/spec_helper.rb
|