libsaml 2.11.1 → 2.11.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 +11 -1
- data/lib/saml/elements/attribute_statement.rb +10 -2
- 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: 52fd6cd1d0af0f41f1632b2479b78d1b5365c455
|
4
|
+
data.tar.gz: 5260800a99393c17ec10737eefdbb4028e9c9cf1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 741c4c38a246efb603c329d72921e7f72560f3256a2593c7759a4b32e5d77d169e515e248bd189405424c1a5851c884806eb6e26308470d32d175a82375c9c38
|
7
|
+
data.tar.gz: ff59291d3bc4120db647434a61d270516bb8f0b26f7aabb65abac070f4857dc0cb45ed30aa5c76af3b0bfe421ed8bd5fd6ab3522366234f9adc133884ec34bb0
|
data/lib/saml/assertion.rb
CHANGED
@@ -58,7 +58,7 @@ module Saml
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def fetch_attribute(key)
|
61
|
-
fetch_attributes(key).first
|
61
|
+
Array(fetch_attributes(key)).first
|
62
62
|
end
|
63
63
|
|
64
64
|
def fetch_attributes(key)
|
@@ -67,6 +67,16 @@ module Saml
|
|
67
67
|
attribute_statements.flat_map { |attribute_statement| attribute_statement.fetch_attributes(key) }
|
68
68
|
end
|
69
69
|
|
70
|
+
def fetch_attribute_value(key)
|
71
|
+
Array(fetch_attribute_values(key)).first
|
72
|
+
end
|
73
|
+
|
74
|
+
def fetch_attribute_values(key)
|
75
|
+
return unless self.attribute_statements
|
76
|
+
return unless self.attribute_statements.flat_map(&:attribute)
|
77
|
+
attribute_statements.flat_map { |attribute_statement| attribute_statement.fetch_attribute_values(key) }
|
78
|
+
end
|
79
|
+
|
70
80
|
def attribute_statement
|
71
81
|
attribute_statements.try(:first)
|
72
82
|
end
|
@@ -11,11 +11,19 @@ module Saml
|
|
11
11
|
has_many :encrypted_attributes, Saml::Elements::EncryptedAttribute
|
12
12
|
|
13
13
|
def fetch_attribute(key)
|
14
|
-
|
14
|
+
fetch_attribute_value(key).content
|
15
15
|
end
|
16
16
|
|
17
17
|
def fetch_attributes(key)
|
18
|
-
|
18
|
+
fetch_attribute_values(key).map(&:content)
|
19
|
+
end
|
20
|
+
|
21
|
+
def fetch_attribute_value(key)
|
22
|
+
fetch_attribute_values(key).first
|
23
|
+
end
|
24
|
+
|
25
|
+
def fetch_attribute_values(key)
|
26
|
+
attribute.find_all { |attr| attr.name == key }.flat_map(&:attribute_values)
|
19
27
|
end
|
20
28
|
end
|
21
29
|
end
|
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: 2.11.
|
4
|
+
version: 2.11.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: 2015-11-
|
11
|
+
date: 2015-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|