omniauth-esia 0.1.0 → 0.2.0
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 +4 -4
- data/Gemfile.lock +2 -19
- data/README.md +7 -3
- data/lib/omniauth/esia/version.rb +2 -2
- data/lib/omniauth/strategies/esia.rb +5 -5
- data/omniauth-esia.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c942e17554438b69bd1b85bfe9c399d5ce78ccac
|
|
4
|
+
data.tar.gz: e67083b533784a0b0fab5039b62ce9cec85fc842
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 85858aeb14e15770f013767b457ff58a13f9465f43d5c72f10c05d98647d4d4f917ff395ab5630abae61faeb22af3fc3559c16e0dab465beec94a75a5453bb2c
|
|
7
|
+
data.tar.gz: 22ba386eeaaf0e531717cc3892526c0b54a64eeb576ad3fecde6346bb179e78175ce77642b6ab6ed76dbfc35a28039fd86c05e70fd72099d82638fb40487b131
|
data/Gemfile.lock
CHANGED
|
@@ -1,21 +1,15 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
omniauth-esia (0.
|
|
4
|
+
omniauth-esia (0.2.0)
|
|
5
5
|
omniauth-oauth2 (~> 1.2)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
8
8
|
remote: https://rubygems.org/
|
|
9
9
|
specs:
|
|
10
|
-
addressable (2.5.2)
|
|
11
|
-
public_suffix (>= 2.0.2, < 4.0)
|
|
12
|
-
byebug (9.1.0)
|
|
13
|
-
crack (0.4.3)
|
|
14
|
-
safe_yaml (~> 1.0.0)
|
|
15
10
|
diff-lcs (1.3)
|
|
16
11
|
faraday (0.12.2)
|
|
17
12
|
multipart-post (>= 1.2, < 3)
|
|
18
|
-
hashdiff (0.3.7)
|
|
19
13
|
hashie (3.5.6)
|
|
20
14
|
jwt (1.5.6)
|
|
21
15
|
multi_json (1.12.2)
|
|
@@ -33,10 +27,7 @@ GEM
|
|
|
33
27
|
omniauth-oauth2 (1.4.0)
|
|
34
28
|
oauth2 (~> 1.0)
|
|
35
29
|
omniauth (~> 1.2)
|
|
36
|
-
public_suffix (3.0.0)
|
|
37
30
|
rack (2.0.3)
|
|
38
|
-
rack-test (0.7.0)
|
|
39
|
-
rack (>= 1.0, < 3)
|
|
40
31
|
rake (10.5.0)
|
|
41
32
|
rspec (3.6.0)
|
|
42
33
|
rspec-core (~> 3.6.0)
|
|
@@ -51,23 +42,15 @@ GEM
|
|
|
51
42
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
52
43
|
rspec-support (~> 3.6.0)
|
|
53
44
|
rspec-support (3.6.0)
|
|
54
|
-
safe_yaml (1.0.4)
|
|
55
|
-
webmock (3.1.0)
|
|
56
|
-
addressable (>= 2.3.6)
|
|
57
|
-
crack (>= 0.3.2)
|
|
58
|
-
hashdiff
|
|
59
45
|
|
|
60
46
|
PLATFORMS
|
|
61
47
|
ruby
|
|
62
48
|
|
|
63
49
|
DEPENDENCIES
|
|
64
50
|
bundler (~> 1.16.a)
|
|
65
|
-
byebug
|
|
66
51
|
omniauth-esia!
|
|
67
|
-
rack-test (~> 0.7.0)
|
|
68
52
|
rake (~> 10.0)
|
|
69
53
|
rspec (~> 3.0)
|
|
70
|
-
webmock (~> 3.1)
|
|
71
54
|
|
|
72
55
|
BUNDLED WITH
|
|
73
|
-
1.16.0.pre.
|
|
56
|
+
1.16.0.pre.3
|
data/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# OmniAuth Esia (OAuth2)
|
|
2
2
|
|
|
3
3
|
This is the unofficial OmniAuth strategy for authenticating via OAuth2 to [ESIA (GosUslugi)](https://esia.gosuslugi.ru). Read more [here](http://minsvyaz.ru/ru/activity/directions/13/)
|
|
4
4
|
|
|
@@ -34,7 +34,7 @@ gem 'omniauth-esia'
|
|
|
34
34
|
```ruby
|
|
35
35
|
# config/initializers/omniauth.rb
|
|
36
36
|
Rails.application.config.middleware.use OmniAuth::Builder do
|
|
37
|
-
provider :esia, ENV['ESIA_ID'],
|
|
37
|
+
provider :esia, ENV['ESIA_ID'],
|
|
38
38
|
scope: 'fullname email',
|
|
39
39
|
key_path: "#{Rails.root}/config/keys/private.key",
|
|
40
40
|
crt_path: "#{Rails.root}/config/keys/certificate.crt"
|
|
@@ -46,7 +46,7 @@ or in Your Rails application with Devise. See full instruction [here](https://gi
|
|
|
46
46
|
```ruby
|
|
47
47
|
# config/initializers/devise.rb
|
|
48
48
|
Devise.setup do |config|
|
|
49
|
-
config.omniauth :esia, ENV['ESIA_ID'],
|
|
49
|
+
config.omniauth :esia, ENV['ESIA_ID'],
|
|
50
50
|
scope: 'fullname email',
|
|
51
51
|
key_path: "#{Rails.root}/config/keys/private.key",
|
|
52
52
|
crt_path: "#{Rails.root}/config/keys/certificate.crt"
|
|
@@ -70,6 +70,10 @@ client_options: {
|
|
|
70
70
|
token_url: '/aas/oauth2/te'
|
|
71
71
|
}
|
|
72
72
|
```
|
|
73
|
+
## Changes
|
|
74
|
+
|
|
75
|
+
v 0.2.0 - corrects namespacing
|
|
76
|
+
v 0.1.0 - first release
|
|
73
77
|
|
|
74
78
|
## Contributing
|
|
75
79
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'omniauth-oauth2'
|
|
2
2
|
require 'base64'
|
|
3
3
|
|
|
4
|
-
module
|
|
4
|
+
module OmniAuth
|
|
5
5
|
module Strategies
|
|
6
6
|
class Esia < OmniAuth::Strategies::OAuth2
|
|
7
7
|
|
|
@@ -56,9 +56,9 @@ module Omniauth
|
|
|
56
56
|
code = request.params['code']
|
|
57
57
|
client.auth_code.get_token(code,
|
|
58
58
|
{
|
|
59
|
-
state: state,
|
|
60
|
-
scope: options.scope,
|
|
61
|
-
timestamp: timestamp,
|
|
59
|
+
state: state,
|
|
60
|
+
scope: options.scope,
|
|
61
|
+
timestamp: timestamp,
|
|
62
62
|
redirect_uri: callback_url,
|
|
63
63
|
token_type: 'Bearer'
|
|
64
64
|
}
|
|
@@ -97,4 +97,4 @@ module Omniauth
|
|
|
97
97
|
end
|
|
98
98
|
end
|
|
99
99
|
|
|
100
|
-
OmniAuth.config.add_camelization 'esia', 'Esia'
|
|
100
|
+
OmniAuth.config.add_camelization 'esia', 'Esia'
|
data/omniauth-esia.gemspec
CHANGED
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.
|
|
4
|
+
version: 0.2.0
|
|
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: 2018-01-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: omniauth-oauth2
|