omniauth-eve_online-sso 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +14 -13
- data/lib/omniauth/eve_online/sso/version.rb +1 -1
- data/lib/omniauth/strategies/eve_online_sso.rb +15 -8
- data/omniauth-eve_online-sso.gemspec +1 -0
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ad822475338693f0bb8f3a0b6ae8e9fd92106a9474da2f4c11047963589883e
|
4
|
+
data.tar.gz: 26fd2e09e12aca85854fe028a3e6897dea90ca3d66d842548c86a76318e85fc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de6aeb0cdb3aeebcb3364d088bcca4b61bca5cfecb8c15c50812d2257c6413054c0520df83b5d2186945a3de538f1c492f5300620954084f9510e65d2fb2af5d
|
7
|
+
data.tar.gz: 52fb849eedf6254eb77d955c6a183f17c1c72f03ba585a2f236cd12e82b13b3e0d82c34b432885a4a08203398c149f09905a408df33181268aa0803c599ed1b6
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
omniauth-eve_online-sso (0.
|
4
|
+
omniauth-eve_online-sso (0.4.0)
|
5
|
+
jwt
|
5
6
|
omniauth-oauth2
|
6
7
|
|
7
8
|
GEM
|
@@ -12,7 +13,7 @@ GEM
|
|
12
13
|
coderay (1.1.3)
|
13
14
|
diff-lcs (1.4.4)
|
14
15
|
docile (1.4.0)
|
15
|
-
faraday (1.
|
16
|
+
faraday (1.8.0)
|
16
17
|
faraday-em_http (~> 1.0)
|
17
18
|
faraday-em_synchrony (~> 1.0)
|
18
19
|
faraday-excon (~> 1.1)
|
@@ -32,7 +33,7 @@ GEM
|
|
32
33
|
faraday-patron (1.0.0)
|
33
34
|
faraday-rack (1.0.0)
|
34
35
|
hashie (4.1.0)
|
35
|
-
jwt (2.
|
36
|
+
jwt (2.3.0)
|
36
37
|
method_source (1.0.0)
|
37
38
|
multi_json (1.15.0)
|
38
39
|
multi_xml (0.6.0)
|
@@ -50,7 +51,7 @@ GEM
|
|
50
51
|
omniauth-oauth2 (1.7.1)
|
51
52
|
oauth2 (~> 1.4)
|
52
53
|
omniauth (>= 1.9, < 3)
|
53
|
-
parallel (1.
|
54
|
+
parallel (1.21.0)
|
54
55
|
parser (3.0.2.0)
|
55
56
|
ast (~> 2.4.1)
|
56
57
|
pry (0.14.1)
|
@@ -76,18 +77,18 @@ GEM
|
|
76
77
|
diff-lcs (>= 1.2.0, < 2.0)
|
77
78
|
rspec-support (~> 3.10.0)
|
78
79
|
rspec-support (3.10.2)
|
79
|
-
rubocop (1.
|
80
|
+
rubocop (1.20.0)
|
80
81
|
parallel (~> 1.10)
|
81
82
|
parser (>= 3.0.0.0)
|
82
83
|
rainbow (>= 2.2.2, < 4.0)
|
83
84
|
regexp_parser (>= 1.8, < 3.0)
|
84
85
|
rexml
|
85
|
-
rubocop-ast (>= 1.
|
86
|
+
rubocop-ast (>= 1.9.1, < 2.0)
|
86
87
|
ruby-progressbar (~> 1.7)
|
87
88
|
unicode-display_width (>= 1.4.0, < 3.0)
|
88
|
-
rubocop-ast (1.
|
89
|
+
rubocop-ast (1.12.0)
|
89
90
|
parser (>= 3.0.1.1)
|
90
|
-
rubocop-performance (1.11.
|
91
|
+
rubocop-performance (1.11.5)
|
91
92
|
rubocop (>= 1.7.0, < 2.0)
|
92
93
|
rubocop-ast (>= 0.4.0)
|
93
94
|
ruby-progressbar (1.11.0)
|
@@ -98,10 +99,10 @@ GEM
|
|
98
99
|
simplecov_json_formatter (~> 0.1)
|
99
100
|
simplecov-html (0.12.3)
|
100
101
|
simplecov_json_formatter (0.1.3)
|
101
|
-
standard (1.
|
102
|
-
rubocop (= 1.
|
103
|
-
rubocop-performance (= 1.11.
|
104
|
-
unicode-display_width (2.
|
102
|
+
standard (1.3.0)
|
103
|
+
rubocop (= 1.20.0)
|
104
|
+
rubocop-performance (= 1.11.5)
|
105
|
+
unicode-display_width (2.1.0)
|
105
106
|
|
106
107
|
PLATFORMS
|
107
108
|
ruby
|
@@ -117,4 +118,4 @@ DEPENDENCIES
|
|
117
118
|
standard
|
118
119
|
|
119
120
|
BUNDLED WITH
|
120
|
-
2.2.
|
121
|
+
2.2.29
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "omniauth-oauth2"
|
4
|
+
require "jwt"
|
4
5
|
|
5
6
|
module OmniAuth
|
6
7
|
module Strategies
|
@@ -12,16 +13,16 @@ module OmniAuth
|
|
12
13
|
token_url: "/v2/oauth/token",
|
13
14
|
site: "https://login.eveonline.com/"
|
14
15
|
|
15
|
-
uid { raw_info["
|
16
|
+
uid { raw_info["character_id"] }
|
16
17
|
|
17
18
|
info do
|
18
19
|
{
|
19
|
-
name: raw_info["
|
20
|
-
character_id: raw_info["
|
21
|
-
expires_on: raw_info["
|
22
|
-
scopes: raw_info["
|
23
|
-
token_type: raw_info["
|
24
|
-
character_owner_hash: raw_info["
|
20
|
+
name: raw_info["name"],
|
21
|
+
character_id: raw_info["character_id"],
|
22
|
+
expires_on: raw_info["expires_on"],
|
23
|
+
scopes: raw_info["scopes"],
|
24
|
+
token_type: raw_info["token_type"],
|
25
|
+
character_owner_hash: raw_info["owner"]
|
25
26
|
}
|
26
27
|
end
|
27
28
|
|
@@ -32,7 +33,13 @@ module OmniAuth
|
|
32
33
|
end
|
33
34
|
|
34
35
|
def raw_info
|
35
|
-
@raw_info ||= access_token.
|
36
|
+
@raw_info ||= JWT.decode(access_token.token, nil, false)
|
37
|
+
.find { |element| element.keys.include?("scp") }.tap do |hash|
|
38
|
+
hash["character_id"] = hash["sub"].split(":")[-1]
|
39
|
+
hash["scopes"] = hash["scp"].join(" ")
|
40
|
+
hash["token_type"] = hash["sub"].split(":")[0].capitalize
|
41
|
+
hash["expires_on"] = hash["exp"]
|
42
|
+
end
|
36
43
|
end
|
37
44
|
end
|
38
45
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-eve_online-sso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Zubkov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth-oauth2
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: jwt
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: bundler
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
142
|
- !ruby/object:Gem::Version
|
129
143
|
version: '0'
|
130
144
|
requirements: []
|
131
|
-
rubygems_version: 3.2.
|
145
|
+
rubygems_version: 3.2.29
|
132
146
|
signing_key:
|
133
147
|
specification_version: 4
|
134
148
|
summary: OmniAuth strategy for EveOnline SSO
|