omniauth-latvija 6.0.0 → 6.1.0

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: 962c2888b86b4eb1b8b3354a8fc8410afb71fbd36804d2f1d032ac79acc1a496
4
- data.tar.gz: 51403707278ddc99297a0ae49707960cde28e425f08db41e134edbf601533a4e
3
+ metadata.gz: b501b35e3685a3963f0f38ec951a345aae8d534dd3ce323566775eda8bb048bf
4
+ data.tar.gz: f9e4ef1dff0294bd8ff5a4389be6bb6964a55b7fe5534c2c266d957515e33a4b
5
5
  SHA512:
6
- metadata.gz: cbe1a3e2097c8417210cc71effd54098230a7ddc9e7f2f6e315098bcf0dc9d1f9959c125cae74b46c8b4095d7eecfb738b1e7a432407c1a96e146810a87e3c4f
7
- data.tar.gz: d077eb5f9a46a4654017a12a7a3fc7e1afa904a0c99c989bbeb3719f576a32d4c6faf5ea41c1bf5ee84f77d9c6bab940f47d638901a025135c91f6eba13a54e5
6
+ metadata.gz: 03c8dc65d2f8a0290756e5b91d8b01bf9fff8dbbf038685566223e3ebb710fc5080e54c91c2b85fc22a32baa182fff4a00c7158d1f9868fce257ea7d3bc6de45
7
+ data.tar.gz: 13a84d4d7b8caa0dbc8685fa7f18eb322d1319ce22f074aeefaa1cd169593abd4f7f3c0853174d640de0b69716c14a507abc04fa33e04272e130393e49118145
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Latvija
3
- VERSION = '6.0.0'
3
+ VERSION = '6.1.0'
4
4
  end
5
5
  end
@@ -42,16 +42,19 @@ module OmniAuth::Strategies
42
42
  'historical_privatepersonalidentifier' => []
43
43
  }
44
44
 
45
- stmt_elements = xml.xpath('//a:Attribute', a: ASSERTION)
45
+ stmt_elements = xml.xpath('//saml:Attribute', saml: ASSERTION)
46
+
46
47
  return attrs if stmt_elements.nil?
47
48
 
49
+ identifiers = stmt_elements.xpath("//saml:Attribute[@AttributeName='privatepersonalidentifier']", saml: ASSERTION)
50
+
48
51
  stmt_elements.each_with_object(attrs) do |element, result|
49
52
  name = element.attribute('AttributeName').value
50
53
  value = element.text
51
54
 
52
55
  case name
53
56
  when 'privatepersonalidentifier' # person can change their identifier, service will return all the versions
54
- if element.attribute('OriginalIssuer') # this is the primary identifier, as returned by third party auth service
57
+ if identifiers.length == 1 || element.attribute('OriginalIssuer') # this is the primary identifier, as returned by third party auth service
55
58
  result[name] = value
56
59
  else
57
60
  result['historical_privatepersonalidentifier'] << value
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-latvija
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.0
4
+ version: 6.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edgars Beigarts
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-01 00:00:00.000000000 Z
11
+ date: 2020-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth
@@ -151,10 +151,10 @@ files:
151
151
  - lib/omniauth/strategies/latvija/decryptor.rb
152
152
  - lib/omniauth/strategies/latvija/response.rb
153
153
  - lib/omniauth/strategies/latvija/signed_document.rb
154
- homepage:
154
+ homepage:
155
155
  licenses: []
156
156
  metadata: {}
157
- post_install_message:
157
+ post_install_message:
158
158
  rdoc_options: []
159
159
  require_paths:
160
160
  - lib
@@ -170,7 +170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
170
170
  version: '0'
171
171
  requirements: []
172
172
  rubygems_version: 3.0.6
173
- signing_key:
173
+ signing_key:
174
174
  specification_version: 4
175
175
  summary: Latvija.lv authentication strategy for OmniAuth
176
176
  test_files: []