spid-es 0.0.41 → 0.0.42

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: 32f95be48c046dba343f7acc8b7de13c4dacac7de884886ae6a01d11a65adae3
4
- data.tar.gz: 8af288d71d66cfae17a4d31733de2f3d4a7418ecd300ecd3bc5e6709ad405e1d
3
+ metadata.gz: 98963a0fb7909e5e96d105a61d7b3a0c10378b39617dbaadb0c5dfdf6ac8e044
4
+ data.tar.gz: 293a46c2471be93d09a6265d28b053f2fce3271d0380ab3981d435f9268023f2
5
5
  SHA512:
6
- metadata.gz: 444bba5f51f3f14cfc53f0d1aea7de7977397c31e9ab800e40f4618ca00cd735709feb7c66e3c2c3a3fb68d3504a9e78cb168faf3d3ca8e6f7c42d995c880637
7
- data.tar.gz: 83268d56cd18656a0fe9459920d306188ea45115e53389c204fec5e59c1e2f2f656f3de578fe17e63dd36da6ec5a33710e597e2d1d2e60fa8fea863de0c362f1
6
+ metadata.gz: 55da9133c1d43fa72384e17d612c86c81ee0cb88f536991a272285c11d2f4cca582ce346d7288055a73ab97ceaac37104e6aedababba781a60a2d4902d76d6d3
7
+ data.tar.gz: 08569eb6ffca8f6fa3e34e31a0c2972fdd049e721ffc7774081c8d98b3283a0034f43ca9baa9da15fcbb38305eadbe68a6a1196f19003aedc4ab0de24c0835e5
@@ -248,7 +248,9 @@ module Spid
248
248
  if settings
249
249
  idp_metadata = Spid::Saml::Metadata.new(settings).get_idp_metadata
250
250
  end
251
-
251
+ #verifico se sono stati scaricati i metadati dell'idp
252
+ return false if validate_metadata_idp(soft) == false
253
+
252
254
  #carico nei setting l'idp_entity_id
253
255
  entity_descriptor_element = REXML::XPath.first(idp_metadata,"/EntityDescriptor")
254
256
  if !entity_descriptor_element.nil?
@@ -334,6 +336,11 @@ module Spid
334
336
  end
335
337
 
336
338
 
339
+ #validate presenza dei metadata per idp
340
+ def validate_metadata_idp(soft=true)
341
+ return (soft ? false : validation_error("Metadata idp non raggiungibile per #{settings.idp_entity_id}")) if document.blank?
342
+ true
343
+ end
337
344
 
338
345
  # Validates the SAML version (2.0)
339
346
  # If fails, the error is added to the errors array.
@@ -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.41'
5
+ s.version = '0.0.42'
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.41
4
+ version: 0.0.42
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-22 00:00:00.000000000 Z
11
+ date: 2020-12-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: canonix