spid-es 0.0.31 → 0.0.36

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
  SHA256:
3
- metadata.gz: 45a2021698f17c419eff32d26d8ce5a49cad6b73aa011448a8457d1a3e94d964
4
- data.tar.gz: aa22c0c52bc2cc16d91403d32465df43ff880302444d500f99d7bfd816787048
3
+ metadata.gz: fc35f70eafa1275d69403829c39f7d6ace54a22e774c32bff48d3c0184f329b6
4
+ data.tar.gz: 096eb602ed50f1dd766ca82c3c937a62fc07f37afe358a9f5d668abdf0c67557
5
5
  SHA512:
6
- metadata.gz: 780073b1f2b9c1a8735725d365fcec406c70772c712c5338780be0d3073cd679802f274a2b497a569f64b3df99b5972c4f579a6785622a9bbb8f805b25efc934
7
- data.tar.gz: 3c0ee1bba5171de914b7b173ed0eacfa76ae91d3c9211dc515e4ef34568db574cb5ac9efab403bbd11b69e9f4f23593f956084ecd69f242ece239373215e3492
6
+ metadata.gz: 3ea7feab8387cc5a089af4ea50fee7674ff0c01c6069e300f1c7b443b510fdc2e07d40f5842f980671b4b0009379dbef6415ac9a8497231f2ff0169d03ed2b06
7
+ data.tar.gz: 4a48fe9e74c6e39359fc9159f3d5ffec662b066daaacf1118cad50ead9c9ca51dcf72a33fd7b240c5195e36fff34c1edaf305d9d6bba37444afb0b90c989196c
@@ -54,20 +54,19 @@ module Spid::Saml
54
54
 
55
55
  unless @settings.issuer.blank?
56
56
  issuer = root.add_element "saml:Issuer"
57
- issuer.attributes['NameQualifier'] = @settings.issuer #non metto @settings.sp_name_qualifier, questo valore deve essere uguale al
58
- #entityID dei metadata che usa @settings.issuer
59
- issuer.attributes['Format'] = "urn:oasis:names:tc:SAML:2.0:nameid-format:entity"
60
- issuer.text = @settings.issuer
57
+ issuer.attributes['NameQualifier'] = ( @settings.aggregato ? @settings.sp_name_qualifier : @settings.issuer )
58
+ issuer.attributes['Format'] = "urn:oasis:names:tc:SAML:2.0:nameid-format:entity"
59
+ issuer.text = @settings.issuer #questo valore deve essere uguale al #entityID dei metadata che usa @settings.issuer
61
60
  end
62
61
 
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
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
71
70
 
72
71
 
73
72
 
@@ -256,18 +256,18 @@ module Spid
256
256
  tipo_aggregatore = extensions_aggregatore.add_element "spid:PublicServicesFullAggregator"
257
257
 
258
258
  unless settings.hash_aggregatore['soggetto_aggregatore'].blank?
259
- company = contact_person_aggregatore.add_element "md:Company"
260
- company.text = settings.hash_aggregatore['soggetto_aggregatore']
259
+ company_aggregatore = contact_person_aggregatore.add_element "md:Company"
260
+ company_aggregatore.text = settings.hash_aggregatore['soggetto_aggregatore']
261
261
  end
262
262
 
263
263
  unless settings.hash_aggregatore['email_aggregatore'].blank?
264
- email_address = contact_person_aggregatore.add_element "md:EmailAddress"
265
- email_address.text = settings.hash_aggregatore['email_aggregatore']
264
+ email_address_aggregatore = contact_person_aggregatore.add_element "md:EmailAddress"
265
+ email_address_aggregatore.text = settings.hash_aggregatore['email_aggregatore']
266
266
  end
267
267
 
268
268
  unless settings.hash_aggregatore['telefono_aggregatore'].blank?
269
- telephone_number = contact_person_aggregatore.add_element "md:TelephoneNumber"
270
- telephone_number.text = settings.hash_aggregatore['telefono_aggregatore']
269
+ telephone_number_aggregatore = contact_person_aggregatore.add_element "md:TelephoneNumber"
270
+ telephone_number_aggregatore.text = settings.hash_aggregatore['telefono_aggregatore']
271
271
  end
272
272
 
273
273
  contact_person_aggregato = root.add_element "md:ContactPerson", {
@@ -275,22 +275,36 @@ module Spid
275
275
  "spid:entityType" => "spid:aggregated"
276
276
  }
277
277
 
278
- company = contact_person_aggregato.add_element "md:Company"
279
- company.text = settings.organization['org_name']
280
-
281
278
  extensions_aggregato = contact_person_aggregato.add_element "md:Extensions"
282
- unless settings.hash_aggregatore['soggetto_aggregato']['vat_number'].blank?
283
- vat_number_aggregato = extensions_aggregato.add_element "spid:VATNumber"
284
- vat_number_aggregato.text = settings.hash_aggregatore['soggetto_aggregato']['vat_number']
285
- end
286
279
  unless settings.hash_aggregatore['soggetto_aggregato']['ipa_code'].blank?
287
280
  ipa_code_aggregato = extensions_aggregato.add_element "spid:IPACode"
288
281
  ipa_code_aggregato.text = settings.hash_aggregatore['soggetto_aggregato']['ipa_code']
289
282
  end
283
+ unless settings.hash_aggregatore['soggetto_aggregato']['vat_number'].blank?
284
+ vat_number_aggregato = extensions_aggregato.add_element "spid:VATNumber"
285
+ vat_number_aggregato.text = settings.hash_aggregatore['soggetto_aggregato']['vat_number']
286
+ end
290
287
  unless settings.hash_aggregatore['soggetto_aggregato']['fiscal_code'].blank?
291
288
  fiscal_code_aggregato = extensions_aggregato.add_element "spid:FiscalCode"
292
289
  fiscal_code_aggregato.text = settings.hash_aggregatore['soggetto_aggregato']['fiscal_code']
293
290
  end
291
+ unless settings.hash_aggregatore['soggetto_aggregato']['ipa_code'].blank?
292
+ tipo_aggregato = extensions_aggregato.add_element "spid:Public"
293
+ end
294
+
295
+ company_aggregato = contact_person_aggregato.add_element "md:Company"
296
+ company_aggregato.text = settings.organization['org_name']
297
+
298
+ unless settings.hash_aggregatore['soggetto_aggregato']['email_address'].blank?
299
+ email_address_aggregato = contact_person_aggregato.add_element "md:EmailAddress"
300
+ email_address_aggregato.text = settings.hash_aggregatore['soggetto_aggregato']['email_address']
301
+ end
302
+
303
+ unless settings.hash_aggregatore['soggetto_aggregato']['telephone_number'].blank?
304
+ telephone_number_aggregato = contact_person_aggregato.add_element "md:TelephoneNumber"
305
+ telephone_number_aggregato.text = settings.hash_aggregatore['soggetto_aggregato']['telephone_number']
306
+ end
307
+
294
308
  end
295
309
 
296
310
  #meta_doc << REXML::XMLDecl.new(version='1.0', encoding='UTF-8')
@@ -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.31'
5
+ s.version = '0.0.36'
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.31
4
+ version: 0.0.36
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-08-28 00:00:00.000000000 Z
11
+ date: 2020-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: canonix