omniauth-bnet 1.1.1 → 2.0.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 +5 -5
- data/Gemfile.lock +18 -17
- data/README.md +1 -1
- data/examples/Gemfile +1 -1
- data/examples/Gemfile.lock +40 -30
- data/examples/sinatra.rb +1 -1
- data/lib/omniauth-bnet/version.rb +1 -1
- data/lib/omniauth/strategies/bnet.rb +2 -11
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: d0861593aa290ff189a8aeab6242a58d98e752eea7c42e7bed26eea36716d295
|
|
4
|
+
data.tar.gz: 2f15f2a415044d877fc8118bffe9a9808ac1b750a05768218657eedabaa0ae4f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c0668ec2b0b92b9107fbc4f12eef97dfc124be914b61d3db8149563e667c0510ce0ff0f0e76e4a8fbd867d1e0fc9fe386c61c29f399b8d71f1c24e4425236b35
|
|
7
|
+
data.tar.gz: 186ba845d833e8a726358d9a9690659500f9ed0fe45711ab96187496fb84e8b042eaf551b41c7bcf698a75494389e07a4d0f89fecf91c199c337eea46908887e
|
data/Gemfile.lock
CHANGED
|
@@ -1,35 +1,33 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
omniauth-bnet (
|
|
4
|
+
omniauth-bnet (2.0.0)
|
|
5
5
|
omniauth (~> 1.0)
|
|
6
6
|
omniauth-oauth2 (~> 1.1)
|
|
7
7
|
|
|
8
8
|
GEM
|
|
9
9
|
remote: https://rubygems.org/
|
|
10
10
|
specs:
|
|
11
|
-
faraday (0.
|
|
11
|
+
faraday (0.12.2)
|
|
12
12
|
multipart-post (>= 1.2, < 3)
|
|
13
|
-
hashie (3.
|
|
14
|
-
jwt (1.
|
|
15
|
-
multi_json (1.
|
|
16
|
-
multi_xml (0.
|
|
13
|
+
hashie (3.5.7)
|
|
14
|
+
jwt (1.5.6)
|
|
15
|
+
multi_json (1.13.1)
|
|
16
|
+
multi_xml (0.6.0)
|
|
17
17
|
multipart-post (2.0.0)
|
|
18
|
-
oauth2 (1.
|
|
19
|
-
faraday (>= 0.8, < 0.
|
|
18
|
+
oauth2 (1.4.0)
|
|
19
|
+
faraday (>= 0.8, < 0.13)
|
|
20
20
|
jwt (~> 1.0)
|
|
21
21
|
multi_json (~> 1.3)
|
|
22
22
|
multi_xml (~> 0.5)
|
|
23
|
-
rack (
|
|
24
|
-
omniauth (1.
|
|
25
|
-
hashie (>=
|
|
26
|
-
rack (
|
|
27
|
-
omniauth-oauth2 (1.
|
|
28
|
-
|
|
29
|
-
multi_json (~> 1.3)
|
|
30
|
-
oauth2 (~> 1.0)
|
|
23
|
+
rack (>= 1.2, < 3)
|
|
24
|
+
omniauth (1.8.1)
|
|
25
|
+
hashie (>= 3.4.6, < 3.6.0)
|
|
26
|
+
rack (>= 1.6.2, < 3)
|
|
27
|
+
omniauth-oauth2 (1.5.0)
|
|
28
|
+
oauth2 (~> 1.1)
|
|
31
29
|
omniauth (~> 1.2)
|
|
32
|
-
rack (
|
|
30
|
+
rack (2.0.5)
|
|
33
31
|
rake (0.9.6)
|
|
34
32
|
|
|
35
33
|
PLATFORMS
|
|
@@ -39,3 +37,6 @@ DEPENDENCIES
|
|
|
39
37
|
bundler (~> 1.6)
|
|
40
38
|
omniauth-bnet!
|
|
41
39
|
rake (~> 0)
|
|
40
|
+
|
|
41
|
+
BUNDLED WITH
|
|
42
|
+
1.16.4
|
data/README.md
CHANGED
|
@@ -5,7 +5,7 @@ Version](https://badge.fury.io/rb/omniauth-bnet.svg)](http://badge.fury.io/rb/om
|
|
|
5
5
|
|
|
6
6
|
This is an OmniAuth strategy for authenticating to Blizzard's Battle.net OAuth
|
|
7
7
|
service. In order to use it you need to register an application at the
|
|
8
|
-
[Battle.net Developer Portal](https://
|
|
8
|
+
[Battle.net Developer Portal](https://develop.battle.net/)
|
|
9
9
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
data/examples/Gemfile
CHANGED
data/examples/Gemfile.lock
CHANGED
|
@@ -1,48 +1,58 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: ..
|
|
3
|
+
specs:
|
|
4
|
+
omniauth-bnet (2.0.0)
|
|
5
|
+
omniauth (~> 1.0)
|
|
6
|
+
omniauth-oauth2 (~> 1.1)
|
|
7
|
+
|
|
1
8
|
GEM
|
|
2
9
|
remote: https://rubygems.org/
|
|
3
10
|
specs:
|
|
4
|
-
faraday (0.
|
|
11
|
+
faraday (0.12.2)
|
|
5
12
|
multipart-post (>= 1.2, < 3)
|
|
6
|
-
hashie (3.
|
|
7
|
-
httplog (
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
13
|
+
hashie (3.5.7)
|
|
14
|
+
httplog (1.1.1)
|
|
15
|
+
rack (>= 1.0)
|
|
16
|
+
rainbow (>= 2.0.0)
|
|
17
|
+
jwt (1.5.6)
|
|
18
|
+
multi_json (1.13.1)
|
|
19
|
+
multi_xml (0.6.0)
|
|
11
20
|
multipart-post (2.0.0)
|
|
12
|
-
|
|
13
|
-
|
|
21
|
+
mustermann (1.0.3)
|
|
22
|
+
oauth2 (1.4.0)
|
|
23
|
+
faraday (>= 0.8, < 0.13)
|
|
14
24
|
jwt (~> 1.0)
|
|
15
25
|
multi_json (~> 1.3)
|
|
16
26
|
multi_xml (~> 0.5)
|
|
17
|
-
rack (
|
|
18
|
-
omniauth (1.
|
|
19
|
-
hashie (>=
|
|
20
|
-
rack (
|
|
21
|
-
omniauth-
|
|
22
|
-
omniauth (~> 1.
|
|
23
|
-
omniauth-oauth2 (
|
|
24
|
-
omniauth-
|
|
25
|
-
|
|
26
|
-
omniauth-oauth2 (~> 1.1)
|
|
27
|
-
omniauth-oauth2 (1.2.0)
|
|
28
|
-
faraday (>= 0.8, < 0.10)
|
|
29
|
-
multi_json (~> 1.3)
|
|
30
|
-
oauth2 (~> 1.0)
|
|
27
|
+
rack (>= 1.2, < 3)
|
|
28
|
+
omniauth (1.8.1)
|
|
29
|
+
hashie (>= 3.4.6, < 3.6.0)
|
|
30
|
+
rack (>= 1.6.2, < 3)
|
|
31
|
+
omniauth-github (1.3.0)
|
|
32
|
+
omniauth (~> 1.5)
|
|
33
|
+
omniauth-oauth2 (>= 1.4.0, < 2.0)
|
|
34
|
+
omniauth-oauth2 (1.5.0)
|
|
35
|
+
oauth2 (~> 1.1)
|
|
31
36
|
omniauth (~> 1.2)
|
|
32
|
-
rack (
|
|
33
|
-
rack-protection (
|
|
37
|
+
rack (2.0.5)
|
|
38
|
+
rack-protection (2.0.4)
|
|
34
39
|
rack
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
rainbow (3.0.0)
|
|
41
|
+
sinatra (2.0.4)
|
|
42
|
+
mustermann (~> 1.0)
|
|
43
|
+
rack (~> 2.0)
|
|
44
|
+
rack-protection (= 2.0.4)
|
|
45
|
+
tilt (~> 2.0)
|
|
46
|
+
tilt (2.0.8)
|
|
40
47
|
|
|
41
48
|
PLATFORMS
|
|
42
49
|
ruby
|
|
43
50
|
|
|
44
51
|
DEPENDENCIES
|
|
45
52
|
httplog
|
|
46
|
-
omniauth-bnet
|
|
53
|
+
omniauth-bnet!
|
|
47
54
|
omniauth-github
|
|
48
55
|
sinatra
|
|
56
|
+
|
|
57
|
+
BUNDLED WITH
|
|
58
|
+
1.16.4
|
data/examples/sinatra.rb
CHANGED
|
@@ -18,7 +18,7 @@ configure do
|
|
|
18
18
|
provider :bnet, ENV['BNET_ID'], ENV['BNET_SECRET'], scope: "wow.profile sc2.profile"
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
-
OmniAuth.config.full_host = "https://
|
|
21
|
+
OmniAuth.config.full_host = "https://localhost"
|
|
22
22
|
|
|
23
23
|
enable :sessions
|
|
24
24
|
enable :inline_templates
|
|
@@ -18,7 +18,7 @@ module OmniAuth
|
|
|
18
18
|
options.client_options[:token_url] = "https://#{getHost(options.region)}/oauth/token"
|
|
19
19
|
end
|
|
20
20
|
if !options.client_options.has_key(:site)
|
|
21
|
-
options.client_options[:site] = "https://#{
|
|
21
|
+
options.client_options[:site] = "https://#{getHost(options.region)}/"
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
super
|
|
@@ -49,7 +49,7 @@ module OmniAuth
|
|
|
49
49
|
|
|
50
50
|
access_token.options[:mode] = :query
|
|
51
51
|
|
|
52
|
-
@raw_info = access_token.get('
|
|
52
|
+
@raw_info = access_token.get('oauth/userinfo').parsed
|
|
53
53
|
end
|
|
54
54
|
|
|
55
55
|
private
|
|
@@ -66,15 +66,6 @@ module OmniAuth
|
|
|
66
66
|
"#{region}.battle.net"
|
|
67
67
|
end
|
|
68
68
|
end
|
|
69
|
-
|
|
70
|
-
def getMasheryHost(region)
|
|
71
|
-
case region
|
|
72
|
-
when "cn"
|
|
73
|
-
"api.battlenet.com.cn"
|
|
74
|
-
else
|
|
75
|
-
"#{region}.api.battle.net"
|
|
76
|
-
end
|
|
77
|
-
end
|
|
78
69
|
end
|
|
79
70
|
end
|
|
80
71
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: omniauth-bnet
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 2.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Christopher Giroir
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2018-10-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: omniauth
|
|
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
106
106
|
version: '0'
|
|
107
107
|
requirements: []
|
|
108
108
|
rubyforge_project:
|
|
109
|
-
rubygems_version: 2.
|
|
109
|
+
rubygems_version: 2.7.7
|
|
110
110
|
signing_key:
|
|
111
111
|
specification_version: 4
|
|
112
112
|
summary: Omniauth Strategy for Battle.net
|