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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 27a6367077f11dfc155f198a8e0e166c906ca957
4
- data.tar.gz: 3862ac1987083bb9fc208abb5e62f3edafa0231c
2
+ SHA256:
3
+ metadata.gz: bd694425a3ba6325b0fa4575f4713eb754aee1a696b7aa6a7dcd6c4a6950049e
4
+ data.tar.gz: 6cd85c1f2e8265d5dce1fb1a3c13bce1ce5e857b6ac18aff38d5bce1b6c66ec2
5
5
  SHA512:
6
- metadata.gz: 471ed5c534c3a08bd620dee2ad975d7465f4500fd79dbc29089cfbd3bbd6a53e2b6c83a3cd90ac43f8a26522c68c9be03ecbd089f296f6a98a4e8aa4d94b1cf9
7
- data.tar.gz: cea679fc3fac72581a90bbf815eb46240e91bbc4df96c9974a465d1cefc209b580a1ff063aac8ff9463907feb725c8b3f51bd2a65a15ac6d46a383130b131b24
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.1)
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.12.2)
11
+ faraday (1.0.0)
12
12
  multipart-post (>= 1.2, < 3)
13
- hashie (3.5.6)
14
- jwt (1.5.6)
15
- multi_json (1.12.2)
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.0.0)
18
- oauth2 (1.4.0)
19
- faraday (>= 0.8, < 0.13)
20
- jwt (~> 1.0)
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.7.1)
25
- hashie (>= 3.4.6, < 3.6.0)
24
+ omniauth (1.9.1)
25
+ hashie (>= 3.4.6)
26
26
  rack (>= 1.6.2, < 3)
27
- omniauth-oauth2 (1.4.0)
28
- oauth2 (~> 1.0)
29
- omniauth (~> 1.2)
30
- rack (2.0.3)
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.16.0.pre.3
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
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Esia
3
- VERSION = '0.2.1'
3
+ VERSION = '0.2.2'
4
4
  end
5
5
  end
@@ -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.1
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: 2018-02-07 00:00:00.000000000 Z
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
- rubyforge_project:
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