ciam-es 0.0.5 → 0.0.6
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 +4 -4
- data/ciam-es.gemspec +1 -1
- data/lib/ciam/ruby-saml/logout_request.rb +8 -10
- data/lib/ciam/ruby-saml/response.rb +6 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3dad8a3cc1881093b5b571a3a6ff5ef017a580efd63eabe3a40551c365b2ed06
|
|
4
|
+
data.tar.gz: a5f904d9fb491a5fa3e916f81ff3a85b86f93536fb32546e35605ca09a3b3530
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f15050be6418bf31b9b680e16de3646cd987d5142db14a9a07656e62b2916d0dd21c891d594cbf8ded5a288ab03162126480318c5fa0cc130ccc1483e03bfd48
|
|
7
|
+
data.tar.gz: 5e49de6e43c66d2823efc1a472be655edca69deebec364d595aea1577eedd203ed272846ab76e252474502f28addd9b3dcc36949a8e51478aa8a6b46dff02a02
|
data/ciam-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 = 'ciam-es'
|
|
5
|
-
s.version = '0.0.
|
|
5
|
+
s.version = '0.0.6'
|
|
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"]
|
|
@@ -41,26 +41,24 @@ module Ciam::Saml
|
|
|
41
41
|
request_doc.context[:attribute_quote] = :quote
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
root = request_doc.add_element "samlp:LogoutRequest", { "xmlns:samlp" => PROTOCOL }
|
|
44
|
+
root = request_doc.add_element "samlp:LogoutRequest", { "xmlns:samlp" => PROTOCOL, "xmlns:saml" => ASSERTION }
|
|
45
45
|
root.attributes['ID'] = @transaction_id
|
|
46
46
|
root.attributes['IssueInstant'] = @issue_instant
|
|
47
47
|
root.attributes['Version'] = "2.0"
|
|
48
48
|
root.attributes['Destination'] = @settings.single_logout_destination
|
|
49
49
|
|
|
50
|
-
issuer = root.add_element "
|
|
51
|
-
issuer.attributes['Format'] = "urn:oasis:names:tc:SAML:2.0:nameid-format:entity"
|
|
52
|
-
|
|
53
|
-
#per la federazione trentina qui ci vanno i metadati...
|
|
54
|
-
issuer.text = @settings.idp_metadata
|
|
50
|
+
issuer = root.add_element "saml:Issuer"#, { "xmlns:saml2" => ASSERTION }
|
|
51
|
+
#issuer.attributes['Format'] = "urn:oasis:names:tc:SAML:2.0:nameid-format:entity"
|
|
52
|
+
issuer.text = @settings.issuer
|
|
55
53
|
|
|
56
|
-
name_id = root.add_element "
|
|
54
|
+
name_id = root.add_element "saml:NameID"#, { "xmlns:saml2" => ASSERTION }
|
|
57
55
|
name_id.attributes['Format'] = "urn:oasis:names:tc:SAML:2.0:nameid-format:transient"
|
|
58
56
|
name_id.attributes['NameQualifier'] = @settings.idp_name_qualifier
|
|
59
57
|
name_id.text = opt[:name_id]
|
|
60
58
|
# I believe the rest of these are optional
|
|
61
|
-
if @settings && @settings.sp_name_qualifier
|
|
62
|
-
|
|
63
|
-
end
|
|
59
|
+
# if @settings && @settings.sp_name_qualifier
|
|
60
|
+
# name_id.attributes["SPNameQualifier"] = @settings.sp_name_qualifier
|
|
61
|
+
# end
|
|
64
62
|
if opt[:session_index]
|
|
65
63
|
session_index = root.add_element "samlp:SessionIndex" #, { "xmlns:samlp" => PROTOCOL }
|
|
66
64
|
session_index.text = opt[:session_index]
|
|
@@ -98,8 +98,13 @@ module Ciam
|
|
|
98
98
|
parse_time(node, "SessionNotOnOrAfter")
|
|
99
99
|
end
|
|
100
100
|
end
|
|
101
|
-
|
|
102
101
|
|
|
102
|
+
def session_index
|
|
103
|
+
@session_index ||= begin
|
|
104
|
+
node = REXML::XPath.first(document, "/p:Response/a:Assertion/a:AuthnStatement", { "p" => PROTOCOL, "a" => ASSERTION })
|
|
105
|
+
node.attributes["SessionIndex"] unless node.blank?
|
|
106
|
+
end
|
|
107
|
+
end
|
|
103
108
|
|
|
104
109
|
# Checks the status of the response for a "Success" code
|
|
105
110
|
def success?
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ciam-es
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.6
|
|
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-09-
|
|
11
|
+
date: 2020-09-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: canonix
|