omniauth-signicat 1.6.1 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05a174ed5554d8195893b87261e594545a9184b0
|
4
|
+
data.tar.gz: 6e5f6200fab15559ff66a5e332033893a6a12cbb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de66cc3ac40a9ef934c8906b6594285d69d4acb1115764466ff53d96434a68d0f44474142796d608724fef02c454a6b2e40f9135d00941fddd201b0337230096
|
7
|
+
data.tar.gz: 13312615e62872be46f32b8a872a0a66c444e739c98c9941835f5fbbc0450f73bf2d7d93cd024d1b5b7425792adf9b6f12bcc94d86638361ba278ec076e479f3
|
@@ -46,6 +46,7 @@ module OmniAuth
|
|
46
46
|
"https://#{options[:env]}.signicat.com",
|
47
47
|
"/std/method/#{options[:service]}",
|
48
48
|
"?id=#{options[:method]}:#{options[:profile]}:#{options[:language]}",
|
49
|
+
"&#{prefilled_query_params}",
|
49
50
|
"&target=#{CGI.escape(callback_url)}"
|
50
51
|
].join('')
|
51
52
|
end
|
@@ -64,6 +65,12 @@ module OmniAuth
|
|
64
65
|
|
65
66
|
private
|
66
67
|
|
68
|
+
def prefilled_query_params
|
69
|
+
options.fetch(:prefilled, {}).map do |key, value|
|
70
|
+
"prefilled.#{key}=#{value}"
|
71
|
+
end.join('&')
|
72
|
+
end
|
73
|
+
|
67
74
|
def verify_signature!(xml)
|
68
75
|
key = extract_public_key(xml)
|
69
76
|
|
@@ -33,6 +33,34 @@ describe OmniAuth::Strategies::Signicat, type: :strategy do
|
|
33
33
|
it 'should redirect correctly' do
|
34
34
|
last_response.location.should include 'https://preprod.signicat.com/std/method/demo?id=nbid:default:nb'
|
35
35
|
end
|
36
|
+
|
37
|
+
context 'when passing phone and subject' do
|
38
|
+
around do |example|
|
39
|
+
signicat_options[:prefilled] = {
|
40
|
+
phone: '99988777',
|
41
|
+
subject: '010170'
|
42
|
+
}
|
43
|
+
example.run
|
44
|
+
end
|
45
|
+
|
46
|
+
it 'should include prefilled query params' do
|
47
|
+
last_response.location.should include '&prefilled.subject=010170'
|
48
|
+
last_response.location.should include '&prefilled.phone=99988777'
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
context 'when passing subject' do
|
53
|
+
around do |example|
|
54
|
+
signicat_options[:prefilled] = {
|
55
|
+
subject: '01017012345'
|
56
|
+
}
|
57
|
+
example.run
|
58
|
+
end
|
59
|
+
|
60
|
+
it 'should include prefilled query params' do
|
61
|
+
last_response.location.should include '&prefilled.subject=01017012345'
|
62
|
+
end
|
63
|
+
end
|
36
64
|
end
|
37
65
|
|
38
66
|
describe 'POST /auth/signicat/callback' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-signicat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Theodor Tonum
|
@@ -15,7 +15,7 @@ authors:
|
|
15
15
|
autorequire:
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
|
-
date: 2016-
|
18
|
+
date: 2016-12-15 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: omniauth
|
@@ -128,11 +128,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
128
|
version: '0'
|
129
129
|
requirements: []
|
130
130
|
rubyforge_project:
|
131
|
-
rubygems_version: 2.
|
131
|
+
rubygems_version: 2.6.8
|
132
132
|
signing_key:
|
133
133
|
specification_version: 4
|
134
134
|
summary: Signicat strategy for OmniAuth.
|
135
135
|
test_files:
|
136
136
|
- spec/omniauth/strategies/signicat_spec.rb
|
137
137
|
- spec/spec_helper.rb
|
138
|
-
has_rdoc:
|