omniauth-bungie-oauth2 1.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/omniauth-bungie-oauth2/version.rb +1 -1
- data/lib/omniauth/strategies/bungie.rb +7 -5
- 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: 0ae5a58332f7b9a97ebfb48b45151b06f3b98bb6
|
4
|
+
data.tar.gz: 3197c73b84b4c359af4008c481e3bd06855b2bd2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f3c44ae4d32a411e6e4f5b044afeb5ea11912ff34d0b3dec64fd9df45ac3be4fd49355de0b6d4cd2dae9809f5234f35c6a9dda2ebb0604e0812b59549ea63aa
|
7
|
+
data.tar.gz: 651dbc6e3ba8cdb4909d2f820369d1511d26a5f939ef32927bb7f88379f4150899c41ac73435d9603092951784593ddc3304b829b21a0714c774c7a2ae8e3782
|
data/README.md
CHANGED
@@ -101,7 +101,7 @@ After all manipulation the `request.env["omniauth.auth"]` have the next fields:
|
|
101
101
|
|
102
102
|
* `uid` with BungieNetUser membershipId
|
103
103
|
* `info` with membershipId, uniqueName, displayName
|
104
|
-
* `extra` with [
|
104
|
+
* `extra` with [GetMembershipDataForCurrentUser](https://destinydevs.github.io/BungieNetPlatform/docs/UserService/GetMembershipDataForCurrentUser) result
|
105
105
|
|
106
106
|
## Contributing
|
107
107
|
|
@@ -27,14 +27,16 @@ module OmniAuth
|
|
27
27
|
end
|
28
28
|
|
29
29
|
uid do
|
30
|
-
raw_info
|
30
|
+
raw_info.dig('bungieNetUser', 'membershipId')
|
31
31
|
end
|
32
32
|
|
33
33
|
info do
|
34
|
+
info = raw_info['bungieNetUser'] || {}
|
35
|
+
|
34
36
|
{
|
35
|
-
:membership_id =>
|
36
|
-
:unique_name
|
37
|
-
:display_name
|
37
|
+
:membership_id => info['membershipId'],
|
38
|
+
:unique_name => info['uniqueName'],
|
39
|
+
:display_name => info['displayName']
|
38
40
|
}
|
39
41
|
end
|
40
42
|
|
@@ -43,7 +45,7 @@ module OmniAuth
|
|
43
45
|
def raw_info
|
44
46
|
return @raw_info unless @raw_info.nil?
|
45
47
|
|
46
|
-
@raw_info = access_token.get('/Platform/User/
|
48
|
+
@raw_info = access_token.get('/Platform/User/GetMembershipsForCurrentUser/').parsed
|
47
49
|
@raw_info = (@raw_info['ErrorCode'] == 1) ? @raw_info['Response'] : {}
|
48
50
|
end
|
49
51
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-bungie-oauth2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitry Ruban
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06-
|
11
|
+
date: 2017-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|