libsaml 3.1.1 → 3.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/saml/assertion.rb +10 -3
- data/lib/saml/elements/attribute_value.rb +1 -0
- data/lib/saml/elements/name_id.rb +1 -0
- data/lib/saml/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 653781649ab736fa3d4e373c424366b6126d5ae0
|
4
|
+
data.tar.gz: ee51d71c7f89226f970fa36824809e67b0fb24ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05d9360fe5c93a25c5e956172d7abb271db94165281217db8cdd19418416256c34ad43649758280288c1062a03666a2fe0f4d42d9008545394788fc69d02fbcd
|
7
|
+
data.tar.gz: ce81cbba375271f0e890368ffbf2dc157b9fdcf849dfedfe70fb73c3de2fea6253b8c7c282746361702ca8d910ac3a2c7b319002b3d77a42547aac9cda47863a
|
data/lib/saml/assertion.rb
CHANGED
@@ -59,12 +59,19 @@ module Saml
|
|
59
59
|
@provider ||= Saml.provider(issuer)
|
60
60
|
end
|
61
61
|
|
62
|
-
def add_attribute(key,
|
62
|
+
def add_attribute(key, value_or_values, value_attributes = {}, attribute_options = {})
|
63
63
|
self.attribute_statement ||= Saml::Elements::AttributeStatement.new
|
64
64
|
self.attribute_statement.attributes ||= []
|
65
|
-
|
65
|
+
attribute_values = case value_or_values
|
66
|
+
when Saml::Elements::NameId
|
67
|
+
[Saml::Elements::AttributeValue.new(value_attributes.merge(name_id: value_or_values))]
|
68
|
+
else
|
69
|
+
Array(value_or_values).collect do |value|
|
70
|
+
Saml::Elements::AttributeValue.new(value_attributes.merge(content: value))
|
71
|
+
end
|
72
|
+
end
|
66
73
|
self.attribute_statement.attributes << Saml::Elements::Attribute.new(
|
67
|
-
attribute_options.merge(name: key,
|
74
|
+
attribute_options.merge(name: key, attribute_values: attribute_values)
|
68
75
|
)
|
69
76
|
end
|
70
77
|
|
data/lib/saml/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: libsaml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benoist Claassen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|