omniauth-steam 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +3 -3
- data/lib/omniauth-steam.rb +1 -1
- data/lib/omniauth-steam/version.rb +1 -1
- data/lib/omniauth/strategies/steam.rb +19 -2
- metadata +16 -28
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b086c2ff552257ccec60f7aef5d91233cde7f0b5
|
4
|
+
data.tar.gz: bf1a2fb360171aba683386dc20cf45d21053e6bb
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a7bdffb89b2a312773228b65835dd99c132d74c3646e7d44226564eaf4be4afd45d81a286d4787d7243420136acca7fe53777c615d6d646b3abb707dcec083fd
|
7
|
+
data.tar.gz: 79eef58ccf55bbbca4125eed3b12ca01530f0094b83a73fc031918eaf422cf9950e5b3fe2da13fb44e133e96717f5d8b80a6d5f18db7b1c09aa2a6655509193f
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# OmniAuth Steam
|
2
2
|
|
3
|
-
This gem is an OmniAuth 1.0 strategy, supporting the OpenID
|
3
|
+
This gem is an OmniAuth 1.0 strategy, supporting the Steam OpenID provider.
|
4
4
|
|
5
5
|
## Usage
|
6
6
|
|
@@ -22,11 +22,11 @@ If you are using Rails, you may want to add it to the middleware stack:
|
|
22
22
|
|
23
23
|
```ruby
|
24
24
|
Rails.application.config.middleware.use OmniAuth::Builder do
|
25
|
-
provider :steam,
|
25
|
+
provider :steam, ENV['STEAM_WEB_API_KEY']
|
26
26
|
end
|
27
27
|
```
|
28
28
|
|
29
|
-
You will need to
|
29
|
+
You will need to provide your Steam Web API key to be able to retrieve information about the authenticated user. You can request one by filling out [this form](http://steamcommunity.com/dev/apikey).
|
30
30
|
|
31
31
|
For additional information, please refer to the [OmniAuth wiki](https://github.com/intridea/omniauth/wiki).
|
32
32
|
|
data/lib/omniauth-steam.rb
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
require "omniauth-steam/version"
|
2
|
-
require "omniauth/strategies/steam"
|
2
|
+
require File.expand_path("../omniauth/strategies/steam", __FILE__)
|
@@ -13,6 +13,7 @@ module OmniAuth
|
|
13
13
|
uid { steam_id }
|
14
14
|
|
15
15
|
info do
|
16
|
+
begin
|
16
17
|
{
|
17
18
|
"nickname" => player["personaname"],
|
18
19
|
"name" => player["realname"],
|
@@ -23,10 +24,19 @@ module OmniAuth
|
|
23
24
|
"FriendList" => friend_list_url
|
24
25
|
}
|
25
26
|
}
|
27
|
+
rescue MultiJson::ParseError => exception
|
28
|
+
fail!(:steamError, exception)
|
29
|
+
{}
|
30
|
+
end
|
26
31
|
end
|
27
32
|
|
28
33
|
extra do
|
29
|
-
|
34
|
+
begin
|
35
|
+
{ "raw_info" => player }
|
36
|
+
rescue MultiJson::ParseError => exception
|
37
|
+
fail!(:steamError, exception)
|
38
|
+
{}
|
39
|
+
end
|
30
40
|
end
|
31
41
|
|
32
42
|
private
|
@@ -40,7 +50,14 @@ module OmniAuth
|
|
40
50
|
end
|
41
51
|
|
42
52
|
def steam_id
|
43
|
-
|
53
|
+
@steam_id ||= begin
|
54
|
+
claimed_id = openid_response.display_identifier.split('/').last
|
55
|
+
expected_uri = "http://steamcommunity.com/openid/id/#{claimed_id}"
|
56
|
+
if openid_response.endpoint.claimed_id != expected_uri
|
57
|
+
raise 'Steam Claimed ID mismatch!'
|
58
|
+
end
|
59
|
+
claimed_id
|
60
|
+
end
|
44
61
|
end
|
45
62
|
|
46
63
|
def player_profile_uri
|
metadata
CHANGED
@@ -1,48 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-steam
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
version: 1.0.3
|
4
|
+
version: 1.0.4
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Rodrigo Navarro
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2017-02-07 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: omniauth-openid
|
16
|
-
type: :runtime
|
17
15
|
requirement: !ruby/object:Gem::Requirement
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
|
-
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
23
22
|
version_requirements: !ruby/object:Gem::Requirement
|
24
23
|
requirements:
|
25
|
-
- -
|
24
|
+
- - ">="
|
26
25
|
- !ruby/object:Gem::Version
|
27
26
|
version: '0'
|
28
|
-
none: false
|
29
|
-
prerelease: false
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: multi_json
|
32
|
-
type: :runtime
|
33
29
|
requirement: !ruby/object:Gem::Requirement
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - ">="
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
|
-
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
39
36
|
version_requirements: !ruby/object:Gem::Requirement
|
40
37
|
requirements:
|
41
|
-
- -
|
38
|
+
- - ">="
|
42
39
|
- !ruby/object:Gem::Version
|
43
40
|
version: '0'
|
44
|
-
none: false
|
45
|
-
prerelease: false
|
46
41
|
description:
|
47
42
|
email:
|
48
43
|
- rnavarro1@gmail.com
|
@@ -50,7 +45,7 @@ executables: []
|
|
50
45
|
extensions: []
|
51
46
|
extra_rdoc_files: []
|
52
47
|
files:
|
53
|
-
- .gitignore
|
48
|
+
- ".gitignore"
|
54
49
|
- Gemfile
|
55
50
|
- README.md
|
56
51
|
- Rakefile
|
@@ -60,32 +55,25 @@ files:
|
|
60
55
|
- omniauth-steam.gemspec
|
61
56
|
homepage: https://github.com/reu/omniauth-steam
|
62
57
|
licenses: []
|
58
|
+
metadata: {}
|
63
59
|
post_install_message:
|
64
60
|
rdoc_options: []
|
65
61
|
require_paths:
|
66
62
|
- lib
|
67
63
|
required_ruby_version: !ruby/object:Gem::Requirement
|
68
64
|
requirements:
|
69
|
-
- -
|
65
|
+
- - ">="
|
70
66
|
- !ruby/object:Gem::Version
|
71
|
-
segments:
|
72
|
-
- 0
|
73
|
-
hash: -1266463752815544285
|
74
67
|
version: '0'
|
75
|
-
none: false
|
76
68
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
77
69
|
requirements:
|
78
|
-
- -
|
70
|
+
- - ">="
|
79
71
|
- !ruby/object:Gem::Version
|
80
|
-
segments:
|
81
|
-
- 0
|
82
|
-
hash: -1266463752815544285
|
83
72
|
version: '0'
|
84
|
-
none: false
|
85
73
|
requirements: []
|
86
74
|
rubyforge_project: omniauth-steam
|
87
|
-
rubygems_version:
|
75
|
+
rubygems_version: 2.5.1
|
88
76
|
signing_key:
|
89
|
-
specification_version:
|
77
|
+
specification_version: 4
|
90
78
|
summary: Steam strategy for OmniAuth
|
91
79
|
test_files: []
|