cie-es 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cie-es.gemspec +1 -1
- data/lib/cie/ruby-saml/authrequest.rb +8 -16
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17039baacb0c826e04c0f680a99728ae18349240e4f4067c08c05a937749c07d
|
4
|
+
data.tar.gz: 832a88a52a91124173399166df86e7751a20d116eb68b68eebfec21dd91be48a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e8452ac15a4e28b4a4fba81804d71b4b3b9854f6155596e822a9b6cfcc0b8dd875b504f5472fb308e7156c8a9094d06ae3649dfff1b377df4b6028b53713c62
|
7
|
+
data.tar.gz: 2c92cfaf417260e0855129bb942c60a4b28230068234ae73456e49c99de6246316a9ca71e77b5cfa225133402a45ee048ceb502bac8341238f08f14729b20c81
|
data/cie-es.gemspec
CHANGED
@@ -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.
|
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 "
|
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
|
-
|
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
|
-
|
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 "
|
66
|
+
root.add_element "samlp:NameIDPolicy", {
|
75
67
|
# Might want to make AllowCreate a setting?
|
76
|
-
|
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 "
|
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 "
|
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 "
|
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.
|
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-
|
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.
|
115
|
+
rubygems_version: 3.0.8
|
116
116
|
signing_key:
|
117
117
|
specification_version: 4
|
118
118
|
summary: SAML Ruby Toolkit Cie
|