libsaml 2.14.0 → 2.15.1

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: 68cc374f731a02daa6a0f13462a40dc0fb5187f5
4
- data.tar.gz: ad65e6af3a361ae5266dfcbf26625433b134f8ae
3
+ metadata.gz: 067b8675cd140dfdc7b65eefba942c99dda19d49
4
+ data.tar.gz: d38738ba962dd8e98010cb75d4be3e094b0d48b8
5
5
  SHA512:
6
- metadata.gz: b2768e1991f8909d74c673c2819b71194a617a171952c4fbc65ca261e259fe99f4c5bf7832b8f46fe3916fa627b5adbf44904493851bbccaf73c02a34a72dd72
7
- data.tar.gz: 6af57acd2b87f93cb6621d55a65498585056c890abc5cb1b1a286c267b417d8238a1c0e0e0fa8914be633383509568a5ad549ac5c5ac33c9591f21b028a25424
6
+ metadata.gz: 7dc9d91c9f0a90ce5f784a53b41b56dfb092102c1e5b30354d3a160e459c3a2e6d2e45b8a70ddb8927e2003d5eb36ada254f02c4e0407af04dbd33f4dcf04402
7
+ data.tar.gz: 9594ae1ac0be7494e4d4458b12efedea85d5665a7adec0c554823818e3511eea3f24deaf2d3b02675b7cfbada999686a7d86698de678a54ebb21877e141fb17c
data/README.md CHANGED
@@ -114,7 +114,7 @@ class SamlController < ApplicationController
114
114
  # provider should be of type Saml::Provider
115
115
  @response = Saml::Bindings::HTTPArtifact.resolve(request, provider.artifact_resolution_service_url)
116
116
  elsif params["SAMLResponse"]
117
- @response = Saml::Bindings::HTTPost.receive_message(request, :response)
117
+ @response = Saml::Bindings::HTTPPost.receive_message(request, :response)
118
118
  else
119
119
  # handle invalid request
120
120
  end
data/lib/libsaml.rb ADDED
@@ -0,0 +1 @@
1
+ require 'saml'
data/lib/saml/artifact.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Saml
2
2
  class Artifact
3
- include ::HappyMapper
3
+ include ::XmlMapper
4
4
 
5
5
  TYPE_CODE = "\000\004"
6
6
  ENDPOINT_INDEX = "\000\000"
data/lib/saml/base.rb CHANGED
@@ -1,21 +1,21 @@
1
- require 'happymapper'
1
+ require 'xmlmapper'
2
2
 
3
3
  module Saml
4
4
  module Base
5
5
  extend ActiveSupport::Concern
6
6
 
7
7
  included do
8
- include ::HappyMapper
8
+ include ::XmlMapper
9
9
  include ::ActiveModel::Validations
10
10
 
11
11
  attr_accessor :xml_value
12
12
  has_xml_content
13
13
 
14
- extend HappyMapperClassMethods
15
- include HappyMapperInstanceMethods
14
+ extend XmlMapperClassMethods
15
+ include XmlMapperInstanceMethods
16
16
  end
17
17
 
18
- module HappyMapperInstanceMethods
18
+ module XmlMapperInstanceMethods
19
19
  def initialize(attributes = {})
20
20
  attributes.each do |key, value|
21
21
  send("#{key}=", value) if respond_to?("#{key}=") && value.present?
@@ -29,7 +29,7 @@ module Saml
29
29
  end
30
30
  end
31
31
 
32
- module HappyMapperClassMethods
32
+ module XmlMapperClassMethods
33
33
  def parse(xml, options = {})
34
34
  if xml.is_a?(String)
35
35
  ActiveSupport::XmlMini_REXML.parse(xml)
@@ -6,7 +6,7 @@ module Saml
6
6
 
7
7
  included do
8
8
  attribute :index, Integer, :tag => "index"
9
- attribute :is_default, HappyMapper::Boolean, :tag => "isDefault"
9
+ attribute :is_default, XmlMapper::Boolean, :tag => "isDefault"
10
10
 
11
11
  validates :index, :presence => true
12
12
  end
@@ -1,4 +1,4 @@
1
- require 'happymapper'
1
+ require 'xmlmapper'
2
2
 
3
3
  module Saml
4
4
  module ComplexTypes
@@ -1,7 +1,7 @@
1
1
  module Saml
2
2
  module ComplexTypes
3
3
  class StatementAbstractType
4
- include HappyMapper
4
+ include XmlMapper
5
5
 
6
6
  register_namespace 'xsi', Saml::XSI_NAMESPACE
7
7
 
@@ -1,4 +1,4 @@
1
- require 'happymapper'
1
+ require 'xmlmapper'
2
2
 
3
3
  module Saml
4
4
  module ComplexTypes
@@ -8,7 +8,7 @@ module Saml
8
8
  namespace "md"
9
9
 
10
10
  attribute :index, Integer, :tag => "index"
11
- attribute :is_default, HappyMapper::Boolean, :tag => "isDefault"
11
+ attribute :is_default, XmlMapper::Boolean, :tag => "isDefault"
12
12
 
13
13
  has_many :service_names, ServiceName
14
14
  has_many :service_descriptions, ServiceDescription
@@ -1,7 +1,7 @@
1
1
  module Saml
2
2
  module Elements
3
3
  class AttributeQuery
4
- include HappyMapper
4
+ include XmlMapper
5
5
  include Saml::Base
6
6
  include Saml::ComplexTypes::AttributeQueryType
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Saml
2
2
  module Elements
3
3
  class EncryptedID
4
- include ::HappyMapper
4
+ include ::XmlMapper
5
5
  include ::Saml::Base
6
6
  include ::Saml::XMLHelpers
7
7
 
@@ -34,7 +34,7 @@ module Saml
34
34
  )
35
35
  encrypted_key = self.encrypted_data.encrypt(name_id_xml, key_options)
36
36
  encrypted_key.set_encryption_method(
37
- algorithm: 'http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p',
37
+ algorithm: 'http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p',
38
38
  digest_method_algorithm: 'http://www.w3.org/2000/09/xmldsig#sha1'
39
39
  )
40
40
  encrypted_key.set_key_name key_name
@@ -1,7 +1,7 @@
1
1
  module Saml
2
2
  module Elements
3
3
  class Evidence
4
- include HappyMapper
4
+ include XmlMapper
5
5
  include Saml::Base
6
6
  include Saml::ComplexTypes::EvidenceType
7
7
 
@@ -10,7 +10,7 @@ module Saml
10
10
 
11
11
  tag 'IDPSSODescriptor'
12
12
 
13
- attribute :want_authn_requests_signed, HappyMapper::Boolean, :tag => "WantAuthnRequestsSigned", :default => false
13
+ attribute :want_authn_requests_signed, XmlMapper::Boolean, :tag => "WantAuthnRequestsSigned", :default => false
14
14
 
15
15
  has_many :single_sign_on_services, SingleSignOnService
16
16
 
@@ -8,7 +8,7 @@ module Saml
8
8
  register_namespace "md", Saml::MD_NAMESPACE
9
9
  namespace "md"
10
10
 
11
- attribute :is_required, HappyMapper::Boolean, :tag => "isRequired"
11
+ attribute :is_required, XmlMapper::Boolean, :tag => "isRequired"
12
12
  end
13
13
  end
14
14
  end
data/lib/saml/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Saml
2
- VERSION = "2.14.0"
2
+ VERSION = "2.15.1"
3
3
  end
@@ -1,3 +1,4 @@
1
+
1
2
  module Saml
2
3
  module XMLHelpers
3
4
  extend ActiveSupport::Concern
@@ -16,7 +17,12 @@ module Saml
16
17
  write_xml = builder.nil? ? true : false
17
18
  builder ||= Nokogiri::XML::Builder.new
18
19
  builder.doc.encoding = "UTF-8"
19
- result = super(builder, default_namespace)
20
+ result = if xml_value
21
+ builder << xml_value
22
+ builder
23
+ else
24
+ super(builder, default_namespace)
25
+ end
20
26
 
21
27
  if write_xml
22
28
  instruct ? result.to_xml(nokogiri_options(options)) : result.doc.root
@@ -43,9 +49,9 @@ module Saml
43
49
 
44
50
  def nokogiri_options(options)
45
51
  nokogiri_options = {
46
- save_with: Nokogiri::XML::Node::SaveOptions::AS_XML | Nokogiri::XML::Node::SaveOptions::FORMAT
52
+ save_with: Nokogiri::XML::Node::SaveOptions::AS_XML
47
53
  }
48
- nokogiri_options[:save_with] = Nokogiri::XML::Node::SaveOptions::AS_XML if options[:no_space]
54
+ nokogiri_options[:save_with] |= Nokogiri::XML::Node::SaveOptions::FORMAT if options[:formatted]
49
55
  nokogiri_options
50
56
  end
51
57
  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.14.0
4
+ version: 2.15.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-11-19 00:00:00.000000000 Z
11
+ date: 2015-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -39,47 +39,47 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: 3.0.0
41
41
  - !ruby/object:Gem::Dependency
42
- name: nokogiri-happymapper
42
+ name: xmlmapper
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.5.7
47
+ version: 0.6.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 0.5.7
54
+ version: 0.6.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: xmldsig
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.3.2
61
+ version: 0.4.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.3.2
68
+ version: 0.4.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: xmlenc
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.4.0
75
+ version: 0.6.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 0.4.0
82
+ version: 0.6.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: curb
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -121,6 +121,7 @@ files:
121
121
  - MIT-LICENSE
122
122
  - README.md
123
123
  - Rakefile
124
+ - lib/libsaml.rb
124
125
  - lib/saml.rb
125
126
  - lib/saml/artifact.rb
126
127
  - lib/saml/artifact_resolve.rb