libsaml 2.6.0 → 2.6.1
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 -6
- data/lib/saml/elements/attribute_statement.rb +6 -5
- 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: 07ae6c9a93423c6b980f593c7ac38d6cf90cb003
|
4
|
+
data.tar.gz: ccbd0755186ced0ffcc73c1ef43be13b74151d6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3e209bf9232f5775e0814f657e597e713a5fcfedfe68df8a22493b5d3ad8741126860ba8fe42fc386da86db8b9fd18661db24c2f0ed19736d0ca6923817d465
|
7
|
+
data.tar.gz: fd58ecd4b590808e0b5934219e9f4f60f921429dadccee034a50c1c0662eda4cfe63da8b87c0c4ca96c0f9747214eff620dba8951a7c707616d8cb4b638a75ea
|
data/lib/saml/assertion.rb
CHANGED
@@ -6,14 +6,14 @@ module Saml
|
|
6
6
|
register_namespace 'samlp', Saml::SAMLP_NAMESPACE
|
7
7
|
register_namespace 'saml', Saml::SAML_NAMESPACE
|
8
8
|
|
9
|
-
tag
|
9
|
+
tag 'Assertion'
|
10
10
|
namespace 'saml'
|
11
11
|
|
12
12
|
attribute :_id, String, :tag => 'ID'
|
13
|
-
attribute :version, String, :tag =>
|
14
|
-
attribute :issue_instant, Time, :tag =>
|
13
|
+
attribute :version, String, :tag => 'Version'
|
14
|
+
attribute :issue_instant, Time, :tag => 'IssueInstant', :on_save => lambda { |val| val.utc.xmlschema }
|
15
15
|
|
16
|
-
element :issuer, String, :namespace => 'saml', :tag =>
|
16
|
+
element :issuer, String, :namespace => 'saml', :tag => 'Issuer'
|
17
17
|
|
18
18
|
has_one :signature, Saml::Elements::Signature
|
19
19
|
has_one :subject, Saml::Elements::Subject
|
@@ -25,7 +25,7 @@ module Saml
|
|
25
25
|
validates :_id, :version, :issue_instant, :issuer, :presence => true
|
26
26
|
|
27
27
|
validates :version, inclusion: %w(2.0)
|
28
|
-
validate :check_issue_instant, :if =>
|
28
|
+
validate :check_issue_instant, :if => 'issue_instant.present?'
|
29
29
|
|
30
30
|
def initialize(*args)
|
31
31
|
options = args.extract_options!
|
@@ -57,9 +57,13 @@ module Saml
|
|
57
57
|
end
|
58
58
|
|
59
59
|
def fetch_attribute(key)
|
60
|
+
fetch_attributes(key).first if fetch_attributes(key)
|
61
|
+
end
|
62
|
+
|
63
|
+
def fetch_attributes(key)
|
60
64
|
return unless self.attribute_statement
|
61
65
|
return unless self.attribute_statement.attribute
|
62
|
-
attribute_statement.
|
66
|
+
attribute_statement.fetch_attributes(key)
|
63
67
|
end
|
64
68
|
|
65
69
|
private
|
@@ -3,7 +3,7 @@ module Saml
|
|
3
3
|
class AttributeStatement
|
4
4
|
include Saml::Base
|
5
5
|
|
6
|
-
tag
|
6
|
+
tag 'AttributeStatement'
|
7
7
|
register_namespace 'saml', Saml::SAML_NAMESPACE
|
8
8
|
namespace 'saml'
|
9
9
|
|
@@ -11,10 +11,11 @@ module Saml
|
|
11
11
|
has_many :encrypted_attributes, Saml::Elements::EncryptedAttribute
|
12
12
|
|
13
13
|
def fetch_attribute(key)
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
14
|
+
fetch_attributes(key).first
|
15
|
+
end
|
16
|
+
|
17
|
+
def fetch_attributes(key)
|
18
|
+
attribute.find_all { |attr| attr.name == key }.map(&:attribute_value)
|
18
19
|
end
|
19
20
|
end
|
20
21
|
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.6.
|
4
|
+
version: 2.6.1
|
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-04-
|
11
|
+
date: 2015-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|