libsaml 2.10.2 → 2.10.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 03512188984760c2d152d49ccbf066ef8de5ac8a
4
- data.tar.gz: 265bb2991e70cee6600bf42fa26eaa3de07a24b4
3
+ metadata.gz: 65bb00a48d385b846b61fbdbeaea20fd3860ffa7
4
+ data.tar.gz: fa24ab968d99462d2c656c61ebcc1c0210513e30
5
5
  SHA512:
6
- metadata.gz: 0450d8e90d2db274513a33592effa7353437941fad270cb2f9b4990c8076d9268a600fc712c9e708dde8676e19a5e12ce73f3b345bfb8a76822358c6681b383e
7
- data.tar.gz: 21c187b09d819a08c11639d2917c1b5b5be7408b648f96c1987fbf27d5091a7d86d8b00ca80f15d4d4ac67db49da3c9f1a5894f6faef948e92ec660a8c78c5f2
6
+ metadata.gz: a8cfee537c6f2926b89b5a37fb697e4b22def49e97fda16d5aea9789da40b4117542e13f4b8779ef79a3d66ab6916be441a97eab2a6ce73c6c7bd287e704b5b1
7
+ data.tar.gz: daaf7976e0b493f9f95eae9d763034451575d752d77d66f2812f2ba53cc3cf2d04acc3485e7782bdddf28634f5710d845682b0751d51690aed6108ff368c20b2
@@ -100,6 +100,7 @@ module Saml
100
100
  require 'saml/complex_types/subject_query_abstract_type'
101
101
  require 'saml/complex_types/attribute_query_type'
102
102
  require 'saml/complex_types/evidence_type'
103
+ require 'saml/complex_types/advice_type'
103
104
  end
104
105
 
105
106
  module Elements
@@ -140,6 +141,7 @@ module Saml
140
141
  require 'saml/elements/organization_url'
141
142
  require 'saml/elements/organization'
142
143
  require 'saml/elements/contact_person'
144
+ require 'saml/elements/advice'
143
145
  require 'saml/elements/idp_sso_descriptor'
144
146
  require 'saml/elements/sp_sso_descriptor'
145
147
  require 'saml/elements/attribute_authority_descriptor'
@@ -18,6 +18,7 @@ module Saml
18
18
  has_one :signature, Saml::Elements::Signature
19
19
  has_one :subject, Saml::Elements::Subject
20
20
  has_one :conditions, Saml::Elements::Conditions
21
+ has_one :advice, Saml::Elements::Advice
21
22
  has_many :statements, Saml::ComplexTypes::StatementAbstractType
22
23
  has_many :authn_statement, Saml::Elements::AuthnStatement
23
24
  has_one :attribute_statement, Saml::Elements::AttributeStatement
@@ -0,0 +1,14 @@
1
+ module Saml
2
+ module ComplexTypes
3
+ module AdviceType
4
+ extend ActiveSupport::Concern
5
+ include Saml::Base
6
+
7
+ included do
8
+ require 'saml/assertion'
9
+
10
+ has_many :assertions, ::Saml::Assertion
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,10 @@
1
+ module Saml
2
+ module Elements
3
+ class Advice
4
+ include ComplexTypes::AdviceType
5
+
6
+ tag 'Advice'
7
+ namespace 'saml'
8
+ end
9
+ end
10
+ end
@@ -7,11 +7,14 @@ module Saml
7
7
  register_namespace 'saml', Saml::SAML_NAMESPACE
8
8
  namespace 'saml'
9
9
 
10
- element :_name_id, NameId, :tag => "NameID"
10
+ has_one :_name_id, Saml::Elements::NameId
11
+ has_one :encrypted_id, Saml::Elements::EncryptedID
11
12
 
12
13
  has_many :subject_confirmation, Saml::Elements::SubjectConfirmation
13
14
 
14
- validates :name_id, :subject_confirmation, :presence => true
15
+ validates :subject_confirmation, presence: true
16
+
17
+ validate :check_identifier
15
18
 
16
19
  def initialize(*args)
17
20
  options = args.extract_options!
@@ -33,6 +36,18 @@ module Saml
33
36
  def name_id_format
34
37
  @_name_id.format
35
38
  end
39
+
40
+ private
41
+
42
+ def check_identifier
43
+ errors.add(:identifiers, :one_identifier_mandatory) if identifiers.blank?
44
+ errors.add(:identifiers, :one_identifier_allowed) if identifiers.size > 1
45
+ end
46
+
47
+ def identifiers
48
+ [_name_id, encrypted_id].compact
49
+ end
50
+
36
51
  end
37
52
  end
38
53
  end
@@ -1,3 +1,3 @@
1
1
  module Saml
2
- VERSION = "2.10.2"
2
+ VERSION = "2.10.3"
3
3
  end
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.10.2
4
+ version: 2.10.3
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-10-29 00:00:00.000000000 Z
11
+ date: 2015-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -133,6 +133,7 @@ files:
133
133
  - lib/saml/bindings/http_post.rb
134
134
  - lib/saml/bindings/http_redirect.rb
135
135
  - lib/saml/bindings/soap.rb
136
+ - lib/saml/complex_types/advice_type.rb
136
137
  - lib/saml/complex_types/attribute_query_type.rb
137
138
  - lib/saml/complex_types/attribute_type.rb
138
139
  - lib/saml/complex_types/endpoint_type.rb
@@ -146,6 +147,7 @@ files:
146
147
  - lib/saml/complex_types/status_response_type.rb
147
148
  - lib/saml/complex_types/subject_query_abstract_type.rb
148
149
  - lib/saml/config.rb
150
+ - lib/saml/elements/advice.rb
149
151
  - lib/saml/elements/attribute.rb
150
152
  - lib/saml/elements/attribute_authority_descriptor.rb
151
153
  - lib/saml/elements/attribute_consuming_service.rb