cie-es 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1fddb69bc580ee945fdf740e072a06a43f13133bc821e65cd4c16ebde05a8490
4
- data.tar.gz: 1ebb454f25165f5916887b4742eeaf0e8a1c9b823bd2377a8c5b12e70d4ac595
3
+ metadata.gz: 17039baacb0c826e04c0f680a99728ae18349240e4f4067c08c05a937749c07d
4
+ data.tar.gz: 832a88a52a91124173399166df86e7751a20d116eb68b68eebfec21dd91be48a
5
5
  SHA512:
6
- metadata.gz: 5f6a34790df5ebf8d9d0bf06e71167e34550b2c972cf113c881d92a86dd96bae9b164b15c2891e20ab3a3f0c67a6c8f18906fcec5c8baca0cf287b352e209c0e
7
- data.tar.gz: e352e080c27f29fc4b214d99466ff75d5e38f2d680fad4d60140865084038d89c308e60c44b804abafbddb961a6c4b4017eb6cbd00de9b1521521be028b531e5
6
+ metadata.gz: 7e8452ac15a4e28b4a4fba81804d71b4b3b9854f6155596e822a9b6cfcc0b8dd875b504f5472fb308e7156c8a9094d06ae3649dfff1b377df4b6028b53713c62
7
+ data.tar.gz: 2c92cfaf417260e0855129bb942c60a4b28230068234ae73456e49c99de6246316a9ca71e77b5cfa225133402a45ee048ceb502bac8341238f08f14729b20c81
@@ -2,7 +2,7 @@ $LOAD_PATH.push File.expand_path('../lib', __FILE__)
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'cie-es'
5
- s.version = '0.0.1'
5
+ s.version = '0.0.2'
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Fabiano Pavan"]
@@ -29,24 +29,16 @@ module Cie::Saml
29
29
  # Create AuthnRequest root element using REXML
30
30
  request_doc = Cie::XMLSecurityNew::Document.new
31
31
  request_doc.context[:attribute_quote] = :quote
32
- root = request_doc.add_element "saml2p:AuthnRequest", { "xmlns:saml2p" => "urn:oasis:names:tc:SAML:2.0:protocol",
32
+ root = request_doc.add_element "samlp:AuthnRequest", { "xmlns:samlp" => "urn:oasis:names:tc:SAML:2.0:protocol",
33
33
  "xmlns:saml" => "urn:oasis:names:tc:SAML:2.0:assertion"
34
34
  }
35
35
  root.attributes['ID'] = uuid
36
36
  root.attributes['IssueInstant'] = time
37
37
  root.attributes['Version'] = "2.0"
38
- #root.attributes['ProtocolBinding'] = "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
38
+ root.attributes['ProtocolBinding'] = "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
39
39
  root.attributes['AttributeConsumingServiceIndex'] = @settings.assertion_consumer_service_index
40
40
  root.attributes['ForceAuthn'] = "true"
41
- #root.attributes['IsPassive'] = "false"
42
- #usato AssertionConsumerServiceURL e ProtocolBinding in alternativa, pag 8 regole tecniche
43
- root.attributes['AssertionConsumerServiceIndex'] = @settings.attribute_consuming_service_index
44
-
45
- #Tolto, utilizzo AssertionConsumerServiceIndex
46
- # # Conditionally defined elements based on settings
47
- # if @settings.assertion_consumer_service_url != nil
48
- # root.attributes["AssertionConsumerServiceURL"] = @settings.assertion_consumer_service_url
49
- # end
41
+ root.attributes["AssertionConsumerServiceURL"] = @settings.assertion_consumer_service_url
50
42
 
51
43
  if @settings.destination_service_url != nil
52
44
  root.attributes["Destination"] = @settings.destination_service_url
@@ -71,9 +63,9 @@ module Cie::Saml
71
63
 
72
64
 
73
65
  if @settings.name_identifier_format != nil
74
- root.add_element "saml2p:NameIDPolicy", {
66
+ root.add_element "samlp:NameIDPolicy", {
75
67
  # Might want to make AllowCreate a setting?
76
- #{}"AllowCreate" => "true",
68
+ "AllowCreate" => "1",
77
69
  "Format" => @settings.name_identifier_format[0]
78
70
  }
79
71
  end
@@ -82,7 +74,7 @@ module Cie::Saml
82
74
  # match required for authentication to succeed. If this is not defined,
83
75
  # the IdP will choose default rules for authentication. (Shibboleth IdP)
84
76
  if @settings.authn_context != nil
85
- requested_context = root.add_element "saml2p:RequestedAuthnContext", {
77
+ requested_context = root.add_element "samlp:RequestedAuthnContext", {
86
78
  "Comparison" => "minimum"
87
79
  }
88
80
  context_class = []
@@ -94,12 +86,12 @@ module Cie::Saml
94
86
  end
95
87
 
96
88
  if @settings.requester_identificator != nil
97
- requester_identificator = root.add_element "saml2p:Scoping", {
89
+ requester_identificator = root.add_element "samlp:Scoping", {
98
90
  "ProxyCount" => "0"
99
91
  }
100
92
  identificators = []
101
93
  @settings.requester_identificator.each_with_index{ |requester, index|
102
- identificators[index] = requester_identificator.add_element "saml2p:RequesterID"
94
+ identificators[index] = requester_identificator.add_element "samlp:RequesterID"
103
95
  identificators[index].text = requester
104
96
  }
105
97
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cie-es
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fabiano Pavan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-04 00:00:00.000000000 Z
11
+ date: 2020-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: canonix
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
112
  - !ruby/object:Gem::Version
113
113
  version: '0'
114
114
  requirements: []
115
- rubygems_version: 3.0.6
115
+ rubygems_version: 3.0.8
116
116
  signing_key:
117
117
  specification_version: 4
118
118
  summary: SAML Ruby Toolkit Cie