saml2 2.2.9 → 2.2.10
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/lib/saml2/attribute.rb +1 -1
- data/lib/saml2/version.rb +1 -1
- data/spec/lib/attribute_spec.rb +18 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 453b3acfb0a9b791d213e0c985e36beaddfc915512a9722aee036bfb09e43a24
|
4
|
+
data.tar.gz: f725eba226322b37181528c19fcdd320477b4cd67b54775cb0d72a727dd761c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95845c85c633d58abf0131820a2be7eb8dfdbca1976e60dc77f5b7fafbcb68024089eefe59e99a42778d4e99ab9c808a4cd278f0aa0c7cacf2b1b04e5975f40c
|
7
|
+
data.tar.gz: 5b45cd12d4f79353a61e36e47fbcd4b4e0d3fbcd6f3eac62dd640a0e19260f3e5deef64c72b01014a2b43e128d6145d10855dcedb5e6ba31ab1d7441f1334930
|
data/lib/saml2/attribute.rb
CHANGED
@@ -190,7 +190,7 @@ module SAML2
|
|
190
190
|
# repeated key; convert to array
|
191
191
|
if attribute.value.is_a?(Array)
|
192
192
|
# both values are arrays; concatenate them
|
193
|
-
|
193
|
+
value.concat(attribute.value)
|
194
194
|
else
|
195
195
|
value << attribute.value
|
196
196
|
end
|
data/lib/saml2/version.rb
CHANGED
data/spec/lib/attribute_spec.rb
CHANGED
@@ -109,6 +109,24 @@ XML
|
|
109
109
|
'eduPersonAffiliation' => 'member',
|
110
110
|
'eduPersonPrincipalName' => 'student@example.edu'})
|
111
111
|
end
|
112
|
+
|
113
|
+
it "properly combines repeated attributes" do
|
114
|
+
attr_statement = AttributeStatement.from_xml(Nokogiri::XML(<<-XML).root)
|
115
|
+
<saml2:AttributeStatement xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">
|
116
|
+
<saml2:Attribute FriendlyName="eduPersonScopedAffiliation" Name="urn:oid:1.3.6.1.4.1.5923.1.1.1.9" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
|
117
|
+
<saml2:AttributeValue>02</saml2:AttributeValue>
|
118
|
+
</saml2:Attribute>
|
119
|
+
<saml2:Attribute FriendlyName="eduPersonScopedAffiliation" Name="urn:oid:1.3.6.1.4.1.5923.1.1.1.9" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
|
120
|
+
<saml2:AttributeValue>employee@school.edu</saml2:AttributeValue>
|
121
|
+
<saml2:AttributeValue>students@school.edu</saml2:AttributeValue>
|
122
|
+
</saml2:Attribute>
|
123
|
+
</saml2:AttributeStatement>
|
124
|
+
XML
|
125
|
+
|
126
|
+
expect(attr_statement.to_h).to eq({
|
127
|
+
'eduPersonScopedAffiliation' => ['02', 'employee@school.edu', 'students@school.edu']
|
128
|
+
})
|
129
|
+
end
|
112
130
|
end
|
113
131
|
end
|
114
132
|
end
|
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: 2.2.
|
4
|
+
version: 2.2.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cody Cutrer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-06-
|
11
|
+
date: 2018-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|