kamiliff 0.33.0 → 0.34.0
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/app/controllers/liff_controller.rb +12 -3
- data/lib/kamiliff/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 11cfdd6d0774b7633ec67141f49a41b8c34a6ae057f076bf91aaae555538236b
|
|
4
|
+
data.tar.gz: c2a05f104e9c15bfa8a287a25b7d8686d5e72d9798282af560b0f7bc274f3642
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2a69c31a08788456a74fd2211ca1d607b87f69f5b1c6b0e56d43466f84225b768069637680d5c567091918c8999d1d0e1cd1a594015edd9423a3b54928917b46
|
|
7
|
+
data.tar.gz: c3cd30b0d24bb39ec6ff7c6fe4c8fa19f436a56e967db1461904e21c7fa4ada0ebb2e9f4a7ea633f4bbe09f3a31f26f396f1816b8153a34f8eb14e90d5574c94
|
|
@@ -85,14 +85,23 @@ class LiffController < ActionController::Base
|
|
|
85
85
|
# }
|
|
86
86
|
def source_info
|
|
87
87
|
context = params["context"]
|
|
88
|
-
return {
|
|
88
|
+
return {
|
|
89
|
+
platform_type: 'line',
|
|
90
|
+
liff_error: 'context not found',
|
|
91
|
+
} if context.nil?
|
|
89
92
|
|
|
90
93
|
profile = params["profile"]
|
|
91
|
-
return {
|
|
94
|
+
return {
|
|
95
|
+
platform_type: 'line',
|
|
96
|
+
liff_error: 'profile not found',
|
|
97
|
+
} if profile.nil?
|
|
92
98
|
|
|
93
99
|
# authorize the user id
|
|
94
100
|
decoded_id_token = get_decoded_id_token
|
|
95
|
-
return {
|
|
101
|
+
return {
|
|
102
|
+
platform_type: 'line',
|
|
103
|
+
liff_error: 'user id does not match',
|
|
104
|
+
} unless decoded_id_token["sub"] == context["userId"] && decoded_id_token["sub"] == profile["userId"]
|
|
96
105
|
|
|
97
106
|
source_type = context["type"].gsub("utou", "user")
|
|
98
107
|
source_group_id = context["roomId"] || context["groupId"] || decoded_id_token["sub"]
|
data/lib/kamiliff/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kamiliff
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.34.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- etrex kuo
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-01-
|
|
11
|
+
date: 2022-01-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|