omniauth-ljne 0.1.5 → 0.1.6
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 +14 -7
- data/omniauth-ljne-0.1.5.gem +0 -0
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 83125df60d556f7a40acf17b2aea81de69105cb5
|
|
4
|
+
data.tar.gz: 5dc4439d41fbb938b67e62795ab9ad6ded59dcfc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fc9ead18654fa94723be237741c60b60ea6d7562e77780dcbad9647b015081698003b48757b1091e335f6b26dc1c502003d8e93ee585860e8ddc2823eacc1bbf
|
|
7
|
+
data.tar.gz: f931f69c7001e204bb336eb0cad58c422f424e759699551d3629f8af1d00ec1eab73eb0af6350050bdf4532f15fe7d467173bbf4fbdbd8a5f61b271542be9b8c
|
data/Gemfile.lock
CHANGED
|
@@ -6,7 +6,7 @@ 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',
|
|
@@ -19,7 +19,7 @@ module OmniAuth
|
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
alias :old_callback_url :callback_url
|
|
22
|
-
|
|
22
|
+
|
|
23
23
|
def callback_url
|
|
24
24
|
if request.params['callback_url']
|
|
25
25
|
request.params['callback_url']
|
|
@@ -37,19 +37,26 @@ module OmniAuth
|
|
|
37
37
|
URI(params['callback_url']).path
|
|
38
38
|
end
|
|
39
39
|
end
|
|
40
|
-
|
|
40
|
+
|
|
41
41
|
uid { raw_info['userId'] }
|
|
42
42
|
|
|
43
43
|
info do
|
|
44
44
|
{
|
|
45
45
|
name: raw_info['displayName'],
|
|
46
|
-
email:
|
|
47
|
-
image: raw_info['pictureUrl']
|
|
48
|
-
description: raw_info['statusMessage'],
|
|
49
|
-
info: raw_info
|
|
46
|
+
email: extra["email"],
|
|
47
|
+
image: raw_info['pictureUrl']
|
|
50
48
|
}
|
|
51
49
|
end
|
|
52
50
|
|
|
51
|
+
extra do
|
|
52
|
+
hash = {}
|
|
53
|
+
hash[:id_token] = access_token['id_token']
|
|
54
|
+
if !options[:skip_jwt] && !access_token['id_token'].nil?
|
|
55
|
+
decoded = ::JWT.decode(access_token['id_token'], nil, false).first
|
|
56
|
+
hash[:id_info] = decoded
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
53
60
|
def raw_info
|
|
54
61
|
@raw_info ||= JSON.load(access_token.get('v2/profile').body)
|
|
55
62
|
rescue ::Errno::ETIMEDOUT
|
|
Binary file
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
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.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- nguyenthanhcong101096
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-09-
|
|
11
|
+
date: 2019-09-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -82,6 +82,7 @@ files:
|
|
|
82
82
|
- omniauth-ljne-0.1.2.gem
|
|
83
83
|
- omniauth-ljne-0.1.3.gem
|
|
84
84
|
- omniauth-ljne-0.1.4.gem
|
|
85
|
+
- omniauth-ljne-0.1.5.gem
|
|
85
86
|
- omniauth-ljne.gemspec
|
|
86
87
|
homepage: https://github.com/nguyenthanhcong101096/omniauth-line
|
|
87
88
|
licenses:
|