omniauth-discord 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/omniauth/discord/version.rb +1 -1
- data/lib/omniauth/strategies/discord.rb +9 -10
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06f2e26f9115c5b08b460462de70e2fbf1455928
|
4
|
+
data.tar.gz: ac15665899d613562ceff35bf72877da5e207e32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe31a35a9eceee77426def17fcf343e90ef26948d2642fd2d2dfc7a81747d4bc0f7c1d5332e0cb2b9ffd0d436028824a0a95227401d1d3c22818d3e06b7aa84e
|
7
|
+
data.tar.gz: 240700d490b44996e55d43ecaf9d7ea142eff77f85a8418b183d966ded0100387ab3252dec2dccef509e40d0ebbd65dcd968d535cf8adf901885474e10945e07
|
@@ -3,18 +3,18 @@ require 'omniauth-oauth2'
|
|
3
3
|
module OmniAuth
|
4
4
|
module Strategies
|
5
5
|
class Discord < OmniAuth::Strategies::OAuth2
|
6
|
-
DEFAULT_SCOPE = '
|
7
|
-
|
6
|
+
DEFAULT_SCOPE = 'identify'
|
7
|
+
|
8
8
|
option :name, 'discord'
|
9
|
-
|
9
|
+
|
10
10
|
option :client_options, {
|
11
11
|
:site => 'https://discordapp.com/api',
|
12
12
|
:authorize_url => 'oauth2/authorize',
|
13
13
|
:token_url => 'oauth2/token'
|
14
14
|
}
|
15
|
-
|
15
|
+
|
16
16
|
option :authorize_options, [:scope]
|
17
|
-
|
17
|
+
|
18
18
|
uid { raw_info['id'] }
|
19
19
|
|
20
20
|
info do
|
@@ -23,8 +23,7 @@ module OmniAuth
|
|
23
23
|
:username => raw_info['username'],
|
24
24
|
:discriminator => raw_info['discriminator'],
|
25
25
|
:avatar => raw_info['avatar'],
|
26
|
-
:verified => raw_info['verified']
|
27
|
-
:email => raw_info['email']
|
26
|
+
:verified => raw_info['verified']
|
28
27
|
}
|
29
28
|
end
|
30
29
|
|
@@ -37,18 +36,18 @@ module OmniAuth
|
|
37
36
|
def raw_info
|
38
37
|
@raw_info = access_token.get('users/@me').parsed
|
39
38
|
end
|
40
|
-
|
39
|
+
|
41
40
|
def callback_url
|
42
41
|
# Discord does not support query parameters
|
43
42
|
full_host + script_name + callback_path
|
44
43
|
end
|
45
|
-
|
44
|
+
|
46
45
|
def authorize_params
|
47
46
|
super.tap do |params|
|
48
47
|
options[:authorize_options].each do |option|
|
49
48
|
params[option] = request.params[option.to_s]
|
50
49
|
end
|
51
|
-
|
50
|
+
|
52
51
|
params[:redirect_uri] = options[:redirect_uri] unless options[:redirect_uri].nil?
|
53
52
|
params[:scope] ||= DEFAULT_SCOPE
|
54
53
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-discord
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adão Raul
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth-oauth2
|
@@ -148,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
148
|
version: '0'
|
149
149
|
requirements: []
|
150
150
|
rubyforge_project:
|
151
|
-
rubygems_version: 2.
|
151
|
+
rubygems_version: 2.5.1
|
152
152
|
signing_key:
|
153
153
|
specification_version: 4
|
154
154
|
summary: Discord OAuth2 Strategy for OmniAuth
|