spid-es 0.0.30 → 0.0.35

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: ef4d9da8e2a6d3b9e6f0b70a8970010864b1cc98a9b3ca7461717512ec6a04b4
4
- data.tar.gz: 18c491970d8215cb051c0a505cf33a65b2f0a1170735d27b527a0c1b2777b5bf
3
+ metadata.gz: cd806ece973eeb83d2bbd5a741b0ff52635f12ef5d07df84f969fae840b88f85
4
+ data.tar.gz: 5387f01ec5f551b616e7addf8ebea520863540565891b13571aa3232703b254a
5
5
  SHA512:
6
- metadata.gz: 83e2246e5c07bc0b143c02a72db90dd75f67c0035f2265c524d82d0c5a9db1226fbf84e27bbda03fe58b71d03c0cd8329a451fc69d7097d03b07c2c0b1d3c482
7
- data.tar.gz: e71257e4fe2e3627d25d880b392527d9f9b4e5a29e3900f2161d584cff4fde9cbafe79f130b5cb09890e7b5a37e8476eeee459aa30197751c533cf284d3bd109
6
+ metadata.gz: 77c67ffbaf85e3e0037d9096ea517a73b978cbeeee8f959a7c09cd09484149ec2c19f8abee03a35e7c0986874b8cbeac2788953e1443134820d659769f5b2714
7
+ data.tar.gz: dec84c9240468a66c36c3bc5a298386435f2bb020a9f962de6e2ef995dc0e019ada6645b6b57dd8fa8adc5be27d4c8d515df092531c6d03c0ae7df2715cdd435
@@ -54,10 +54,9 @@ 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
62
  #opzionale
@@ -235,20 +235,6 @@ module Spid
235
235
  "contactType" => "other",
236
236
  "spid:entityType" => "spid:aggregator"
237
237
  }
238
- unless settings.hash_aggregatore['soggetto_aggregatore'].blank?
239
- company = contact_person_aggregatore.add_element "md:Company"
240
- company.text = settings.hash_aggregatore['soggetto_aggregatore']
241
- end
242
-
243
- unless settings.hash_aggregatore['email_aggregatore'].blank?
244
- email_address = contact_person_aggregatore.add_element "md:EmailAddress"
245
- email_address.text = settings.hash_aggregatore['email_aggregatore']
246
- end
247
-
248
- unless settings.hash_aggregatore['telefono_aggregatore'].blank?
249
- telephone_number = contact_person_aggregatore.add_element "md:TelephoneNumber"
250
- telephone_number.text = settings.hash_aggregatore['telefono_aggregatore']
251
- end
252
238
 
253
239
  extensions_aggregatore = contact_person_aggregatore.add_element "md:Extensions"
254
240
 
@@ -269,26 +255,56 @@ module Spid
269
255
 
270
256
  tipo_aggregatore = extensions_aggregatore.add_element "spid:PublicServicesFullAggregator"
271
257
 
258
+ unless settings.hash_aggregatore['soggetto_aggregatore'].blank?
259
+ company_aggregatore = contact_person_aggregatore.add_element "md:Company"
260
+ company_aggregatore.text = settings.hash_aggregatore['soggetto_aggregatore']
261
+ end
262
+
263
+ unless settings.hash_aggregatore['email_aggregatore'].blank?
264
+ email_address_aggregatore = contact_person_aggregatore.add_element "md:EmailAddress"
265
+ email_address_aggregatore.text = settings.hash_aggregatore['email_aggregatore']
266
+ end
267
+
268
+ unless settings.hash_aggregatore['telefono_aggregatore'].blank?
269
+ telephone_number_aggregatore = contact_person_aggregatore.add_element "md:TelephoneNumber"
270
+ telephone_number_aggregatore.text = settings.hash_aggregatore['telefono_aggregatore']
271
+ end
272
+
272
273
  contact_person_aggregato = root.add_element "md:ContactPerson", {
273
274
  "contactType" => "other",
274
275
  "spid:entityType" => "spid:aggregated"
275
276
  }
276
- company = contact_person_aggregato.add_element "md:Company"
277
- company.text = settings.organization['org_name']
278
277
 
279
278
  extensions_aggregato = contact_person_aggregato.add_element "md:Extensions"
280
- unless settings.hash_aggregatore['soggetto_aggregato']['vat_number'].blank?
281
- vat_number_aggregato = extensions_aggregato.add_element "spid:VATNumber"
282
- vat_number_aggregato.text = settings.hash_aggregatore['soggetto_aggregato']['vat_number']
283
- end
284
279
  unless settings.hash_aggregatore['soggetto_aggregato']['ipa_code'].blank?
285
280
  ipa_code_aggregato = extensions_aggregato.add_element "spid:IPACode"
286
281
  ipa_code_aggregato.text = settings.hash_aggregatore['soggetto_aggregato']['ipa_code']
287
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
288
287
  unless settings.hash_aggregatore['soggetto_aggregato']['fiscal_code'].blank?
289
288
  fiscal_code_aggregato = extensions_aggregato.add_element "spid:FiscalCode"
290
289
  fiscal_code_aggregato.text = settings.hash_aggregatore['soggetto_aggregato']['fiscal_code']
291
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
+
292
308
  end
293
309
 
294
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.30'
5
+ s.version = '0.0.35'
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.30
4
+ version: 0.0.35
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-07-22 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