omniauth-ljne 0.1.7 → 0.1.8
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/omniauth/ljne/version.rb +1 -1
- data/lib/omniauth/strategies/line.rb +6 -20
- data/omniauth-ljne-0.1.7.gem +0 -0
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dd5defe753153e553bd9671b77171712b58839e1acc57367f3fb486dd315dffa
|
|
4
|
+
data.tar.gz: 4c54d275c163fd95420f192e97d1f36510ae32552707ee55e8ee95985c4d1740
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 73a5c694a93118f86db20e73063e53689104e7265d96c984691d35d6ed61dec7cdffd8a44501d605b1630dc8b03fecab0d5e3a3b8bc0552769c019b2e495ab30
|
|
7
|
+
data.tar.gz: a86a3b73de4ba82f9b61a6c36377880f9faba67c7701aff5b96e32dcfc0090a203817ca26822e26d3ef640a76ffa5a9ff6db1a74337117134ff9b7f8d7d29b85
|
data/Gemfile.lock
CHANGED
|
@@ -6,36 +6,21 @@ module OmniAuth
|
|
|
6
6
|
class Line < OmniAuth::Strategies::OAuth2
|
|
7
7
|
option :name, 'line'
|
|
8
8
|
option :scope, 'profile openid email'
|
|
9
|
-
|
|
9
|
+
|
|
10
10
|
option :client_options, {
|
|
11
11
|
site: 'https://access.line.me',
|
|
12
12
|
authorize_url: '/oauth2/v2.1/authorize',
|
|
13
13
|
token_url: '/oauth2/v2.1/token'
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
# host changed
|
|
16
17
|
def callback_phase
|
|
17
18
|
options[:client_options][:site] = 'https://api.line.me'
|
|
18
19
|
super
|
|
19
20
|
end
|
|
20
21
|
|
|
21
|
-
alias :old_callback_url :callback_url
|
|
22
|
-
|
|
23
22
|
def callback_url
|
|
24
|
-
|
|
25
|
-
request.params['callback_url']
|
|
26
|
-
else
|
|
27
|
-
old_callback_url
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
def callback_path
|
|
32
|
-
params = session['omniauth.params']
|
|
33
|
-
|
|
34
|
-
if params.nil? || params['callback_url'].nil?
|
|
35
|
-
super
|
|
36
|
-
else
|
|
37
|
-
URI(params['callback_url']).path
|
|
38
|
-
end
|
|
23
|
+
options[:redirect_uri] || (full_host + script_name + callback_path)
|
|
39
24
|
end
|
|
40
25
|
|
|
41
26
|
uid { raw_info['userId'] }
|
|
@@ -43,8 +28,8 @@ module OmniAuth
|
|
|
43
28
|
info do
|
|
44
29
|
{
|
|
45
30
|
name: raw_info['displayName'],
|
|
46
|
-
|
|
47
|
-
|
|
31
|
+
image: raw_info['pictureUrl'],
|
|
32
|
+
email: extra['email']
|
|
48
33
|
}
|
|
49
34
|
end
|
|
50
35
|
|
|
@@ -57,6 +42,7 @@ module OmniAuth
|
|
|
57
42
|
end
|
|
58
43
|
end
|
|
59
44
|
|
|
45
|
+
# Require: Access token with PROFILE permission issued.
|
|
60
46
|
def raw_info
|
|
61
47
|
@raw_info ||= JSON.load(access_token.get('v2/profile').body)
|
|
62
48
|
rescue ::Errno::ETIMEDOUT
|
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: omniauth-ljne
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- nguyenthanhcong101096
|
|
@@ -84,6 +84,7 @@ files:
|
|
|
84
84
|
- omniauth-ljne-0.1.4.gem
|
|
85
85
|
- omniauth-ljne-0.1.5.gem
|
|
86
86
|
- omniauth-ljne-0.1.6.gem
|
|
87
|
+
- omniauth-ljne-0.1.7.gem
|
|
87
88
|
- omniauth-ljne.gemspec
|
|
88
89
|
homepage: https://github.com/nguyenthanhcong101096/omniauth-line
|
|
89
90
|
licenses:
|