spid-es 0.0.35 → 0.0.40

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: cd806ece973eeb83d2bbd5a741b0ff52635f12ef5d07df84f969fae840b88f85
4
- data.tar.gz: 5387f01ec5f551b616e7addf8ebea520863540565891b13571aa3232703b254a
3
+ metadata.gz: aec9beb93fb42dba8f0203fad88e2dabf65e276c6395e19cf92e2e165c9c2f4f
4
+ data.tar.gz: 0e0836070cda5dcc33c089e48519d58866fa43e3574fbecd38249191f36bb85c
5
5
  SHA512:
6
- metadata.gz: 77c67ffbaf85e3e0037d9096ea517a73b978cbeeee8f959a7c09cd09484149ec2c19f8abee03a35e7c0986874b8cbeac2788953e1443134820d659769f5b2714
7
- data.tar.gz: dec84c9240468a66c36c3bc5a298386435f2bb020a9f962de6e2ef995dc0e019ada6645b6b57dd8fa8adc5be27d4c8d515df092531c6d03c0ae7df2715cdd435
6
+ metadata.gz: 236ce0c3aa6da8d8468d02ab195c708d2f6cda0f80112bfeca63fba4ec48238d329bfe98b027c988c6a2c6691b789d9f5f61dcb9d3b3a96c282bfe4f86dab576
7
+ data.tar.gz: 858ce0f3f1eed80bf3d66e2e42e326cd01c0cbfe515b86f78f80a3f042bf2f3a5b7eb47467bad89e8302aca5c5cd07583c799c99f88f8d19a6f99bb5013cb66e
@@ -30,7 +30,7 @@ module Spid::Saml
30
30
  request_doc = Spid::XMLSecurityNew::Document.new
31
31
  request_doc.context[:attribute_quote] = :quote
32
32
  root = request_doc.add_element "saml2p:AuthnRequest", { "xmlns:saml2p" => "urn:oasis:names:tc:SAML:2.0:protocol",
33
- "xmlns:saml" => "urn:oasis:names:tc:SAML:2.0:assertion"
33
+ "xmlns:saml2" => "urn:oasis:names:tc:SAML:2.0:assertion"
34
34
  }
35
35
  root.attributes['ID'] = uuid
36
36
  root.attributes['IssueInstant'] = time
@@ -53,20 +53,21 @@ module Spid::Saml
53
53
  end
54
54
 
55
55
  unless @settings.issuer.blank?
56
- issuer = root.add_element "saml:Issuer"
57
- issuer.attributes['NameQualifier'] = ( @settings.aggregato ? @settings.sp_name_qualifier : @settings.issuer )
56
+ issuer = root.add_element "saml2:Issuer", { "xmlns:saml2" => "urn:oasis:names:tc:SAML:2.0:assertion" }
57
+ #l'attributo NameQualifier deve essere presente, non rispetta saml...
58
+ issuer.attributes['NameQualifier'] = ( @settings.aggregato ? @settings.sp_name_qualifier : @settings.issuer )
58
59
  issuer.attributes['Format'] = "urn:oasis:names:tc:SAML:2.0:nameid-format:entity"
59
60
  issuer.text = @settings.issuer #questo valore deve essere uguale al #entityID dei metadata che usa @settings.issuer
60
61
  end
61
62
 
62
- #opzionale
63
- unless @settings.sp_name_qualifier.blank?
64
- subject = root.add_element "saml:Subject"
65
- name_id = subject.add_element "saml:NameID"
66
- name_id.attributes['Format'] = "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"
67
- name_id.attributes['NameQualifier'] = @settings.sp_name_qualifier
68
- name_id.text = @settings.sp_name_identifier
69
- end
63
+ # #opzionale
64
+ # unless @settings.sp_name_qualifier.blank?
65
+ # subject = root.add_element "saml:Subject"
66
+ # name_id = subject.add_element "saml:NameID"
67
+ # name_id.attributes['Format'] = "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"
68
+ # name_id.attributes['NameQualifier'] = @settings.sp_name_qualifier
69
+ # name_id.text = @settings.sp_name_identifier
70
+ # end
70
71
 
71
72
 
72
73
 
@@ -83,11 +84,11 @@ module Spid::Saml
83
84
  # the IdP will choose default rules for authentication. (Shibboleth IdP)
84
85
  if @settings.authn_context != nil
85
86
  requested_context = root.add_element "saml2p:RequestedAuthnContext", {
86
- "Comparison" => "minimum"
87
+ "Comparison" => "exact"
87
88
  }
88
89
  context_class = []
89
90
  @settings.authn_context.each_with_index{ |context, index|
90
- context_class[index] = requested_context.add_element "saml:AuthnContextClassRef"
91
+ context_class[index] = requested_context.add_element "saml2:AuthnContextClassRef"
91
92
  context_class[index].text = context
92
93
  }
93
94
 
@@ -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 = 'spid-es'
5
- s.version = '0.0.35'
5
+ s.version = '0.0.40'
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"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spid-es
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.35
4
+ version: 0.0.40
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-10-15 00:00:00.000000000 Z
11
+ date: 2020-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: canonix