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 +4 -4
- data/lib/omniauth-latvija/version.rb +1 -1
- data/lib/omniauth/strategies/latvija/response.rb +5 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b501b35e3685a3963f0f38ec951a345aae8d534dd3ce323566775eda8bb048bf
|
4
|
+
data.tar.gz: f9e4ef1dff0294bd8ff5a4389be6bb6964a55b7fe5534c2c266d957515e33a4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03c8dc65d2f8a0290756e5b91d8b01bf9fff8dbbf038685566223e3ebb710fc5080e54c91c2b85fc22a32baa182fff4a00c7158d1f9868fce257ea7d3bc6de45
|
7
|
+
data.tar.gz: 13a84d4d7b8caa0dbc8685fa7f18eb322d1319ce22f074aeefaa1cd169593abd4f7f3c0853174d640de0b69716c14a507abc04fa33e04272e130393e49118145
|
@@ -42,16 +42,19 @@ module OmniAuth::Strategies
|
|
42
42
|
'historical_privatepersonalidentifier' => []
|
43
43
|
}
|
44
44
|
|
45
|
-
stmt_elements = xml.xpath('//
|
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.
|
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-
|
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: []
|