omniauth-esia 0.2.1 → 0.2.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 +5 -5
- data/Gemfile.lock +16 -16
- data/README.md +3 -0
- data/lib/omniauth/esia/version.rb +1 -1
- data/lib/omniauth/strategies/esia.rb +2 -1
- metadata +3 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: bd694425a3ba6325b0fa4575f4713eb754aee1a696b7aa6a7dcd6c4a6950049e
|
|
4
|
+
data.tar.gz: 6cd85c1f2e8265d5dce1fb1a3c13bce1ce5e857b6ac18aff38d5bce1b6c66ec2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3ab6ab17aa9135ce39f09e4042b4f2f634a21e9f553d24c838b70790240e2d1eadd898f4d8e734d617681d30b30771b5eedb51b368aeea1e9452e0d2bb8fb5a4
|
|
7
|
+
data.tar.gz: 9aeab84210dd06d6ede3a49dc0aab1c403f225d88d5f0a0003afc0df2800eebecacec5daff636f6d4f5065549d54dc0be47b7f0e65cb64779e213d88076c0206
|
data/Gemfile.lock
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
omniauth-esia (0.2.
|
|
4
|
+
omniauth-esia (0.2.2)
|
|
5
5
|
omniauth-oauth2 (~> 1.2)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
8
8
|
remote: https://rubygems.org/
|
|
9
9
|
specs:
|
|
10
10
|
diff-lcs (1.3)
|
|
11
|
-
faraday (0.
|
|
11
|
+
faraday (1.0.0)
|
|
12
12
|
multipart-post (>= 1.2, < 3)
|
|
13
|
-
hashie (
|
|
14
|
-
jwt (
|
|
15
|
-
multi_json (1.
|
|
13
|
+
hashie (4.1.0)
|
|
14
|
+
jwt (2.2.1)
|
|
15
|
+
multi_json (1.14.1)
|
|
16
16
|
multi_xml (0.6.0)
|
|
17
|
-
multipart-post (2.
|
|
18
|
-
oauth2 (1.4.
|
|
19
|
-
faraday (>= 0.8, < 0
|
|
20
|
-
jwt (
|
|
17
|
+
multipart-post (2.1.1)
|
|
18
|
+
oauth2 (1.4.4)
|
|
19
|
+
faraday (>= 0.8, < 2.0)
|
|
20
|
+
jwt (>= 1.0, < 3.0)
|
|
21
21
|
multi_json (~> 1.3)
|
|
22
22
|
multi_xml (~> 0.5)
|
|
23
23
|
rack (>= 1.2, < 3)
|
|
24
|
-
omniauth (1.
|
|
25
|
-
hashie (>= 3.4.6
|
|
24
|
+
omniauth (1.9.1)
|
|
25
|
+
hashie (>= 3.4.6)
|
|
26
26
|
rack (>= 1.6.2, < 3)
|
|
27
|
-
omniauth-oauth2 (1.
|
|
28
|
-
oauth2 (~> 1.
|
|
29
|
-
omniauth (~> 1.
|
|
30
|
-
rack (2.
|
|
27
|
+
omniauth-oauth2 (1.6.0)
|
|
28
|
+
oauth2 (~> 1.1)
|
|
29
|
+
omniauth (~> 1.9)
|
|
30
|
+
rack (2.2.2)
|
|
31
31
|
rake (10.5.0)
|
|
32
32
|
rspec (3.6.0)
|
|
33
33
|
rspec-core (~> 3.6.0)
|
|
@@ -53,4 +53,4 @@ DEPENDENCIES
|
|
|
53
53
|
rspec (~> 3.0)
|
|
54
54
|
|
|
55
55
|
BUNDLED WITH
|
|
56
|
-
1.
|
|
56
|
+
1.17.3
|
data/README.md
CHANGED
|
@@ -36,6 +36,7 @@ gem 'omniauth-esia'
|
|
|
36
36
|
Rails.application.config.middleware.use OmniAuth::Builder do
|
|
37
37
|
provider :esia, ENV['ESIA_ID'],
|
|
38
38
|
scope: 'fullname email',
|
|
39
|
+
key_passphrase: 'password',
|
|
39
40
|
key_path: "#{Rails.root}/config/keys/private.key",
|
|
40
41
|
crt_path: "#{Rails.root}/config/keys/certificate.crt"
|
|
41
42
|
end
|
|
@@ -48,6 +49,7 @@ or in Your Rails application with Devise. See full instruction [here](https://gi
|
|
|
48
49
|
Devise.setup do |config|
|
|
49
50
|
config.omniauth :esia, ENV['ESIA_ID'],
|
|
50
51
|
scope: 'fullname email',
|
|
52
|
+
key_passphrase: 'password',
|
|
51
53
|
key_path: "#{Rails.root}/config/keys/private.key",
|
|
52
54
|
crt_path: "#{Rails.root}/config/keys/certificate.crt"
|
|
53
55
|
end
|
|
@@ -71,6 +73,7 @@ client_options: {
|
|
|
71
73
|
}
|
|
72
74
|
```
|
|
73
75
|
## Changes
|
|
76
|
+
v 0.2.2 - adds key_passphrase option
|
|
74
77
|
v 0.2.1 - corrects email fetching
|
|
75
78
|
v 0.2.0 - corrects namespacing
|
|
76
79
|
v 0.1.0 - first release
|
|
@@ -14,6 +14,7 @@ module OmniAuth
|
|
|
14
14
|
}
|
|
15
15
|
option :scope, 'fullname'
|
|
16
16
|
option :key_path, 'config/keys/private.key'
|
|
17
|
+
option :key_passphrase, nil
|
|
17
18
|
option :crt_path, 'config/keys/certificate.crt'
|
|
18
19
|
option :access_type, 'online'
|
|
19
20
|
|
|
@@ -70,7 +71,7 @@ module OmniAuth
|
|
|
70
71
|
def client_secret
|
|
71
72
|
@client_secret ||= begin
|
|
72
73
|
data = "#{options.scope}#{timestamp}#{options.client_id}#{state}"
|
|
73
|
-
key = OpenSSL::PKey.read(File.read(options.key_path))
|
|
74
|
+
key = OpenSSL::PKey.read(File.read(options.key_path), options.key_passphrase)
|
|
74
75
|
crt = OpenSSL::X509::Certificate.new(File.read(options.crt_path))
|
|
75
76
|
signed = OpenSSL::PKCS7.sign(crt, key, data, [], OpenSSL::PKCS7::DETACHED)
|
|
76
77
|
Base64.urlsafe_encode64(signed.to_der.to_s.force_encoding('utf-8'), padding: false)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: omniauth-esia
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Elsant
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2020-03-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: omniauth-oauth2
|
|
@@ -107,8 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
107
107
|
- !ruby/object:Gem::Version
|
|
108
108
|
version: '0'
|
|
109
109
|
requirements: []
|
|
110
|
-
|
|
111
|
-
rubygems_version: 2.6.11
|
|
110
|
+
rubygems_version: 3.0.3
|
|
112
111
|
signing_key:
|
|
113
112
|
specification_version: 4
|
|
114
113
|
summary: ESIA OAuth2 Strategy for OmniAuth
|