kamiliff 0.34.0 → 0.35.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/liff_controller.rb +12 -0
- data/lib/kamiliff/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5cadd63601665e9929d92e4a388c7302da061204ac677151e3f31bd22f3ad5df
|
4
|
+
data.tar.gz: 062cdd8edc89cbf4b01b6d7cfd7308f19d31ea1364b5d7b2032dfe749a0104dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04c61b4c8aea5c4b54cb788353d8c8ed46ff7d44e978088a723449327d4baf0ed53254c56d618fb0f233b84ee2df9c7b8570c6f2460815afdccf8ff21e0d4558
|
7
|
+
data.tar.gz: 64123903cf8a36641ffae41b9ca42f77d41034f1174f5822792ea77029ff13c31d76f43a08b4e4c587dd1928882c972233205cef6dd717859c42fc49886b7219
|
@@ -94,13 +94,25 @@ class LiffController < ActionController::Base
|
|
94
94
|
return {
|
95
95
|
platform_type: 'line',
|
96
96
|
liff_error: 'profile not found',
|
97
|
+
context: context,
|
97
98
|
} if profile.nil?
|
98
99
|
|
99
100
|
# authorize the user id
|
100
101
|
decoded_id_token = get_decoded_id_token
|
102
|
+
|
103
|
+
return {
|
104
|
+
platform_type: 'line',
|
105
|
+
liff_error: 'id token not found',
|
106
|
+
context: context,
|
107
|
+
profile: profile,
|
108
|
+
} if params["idToken"].nil?
|
109
|
+
|
101
110
|
return {
|
102
111
|
platform_type: 'line',
|
103
112
|
liff_error: 'user id does not match',
|
113
|
+
context: context,
|
114
|
+
profile: profile,
|
115
|
+
decoded_id_token: decoded_id_token
|
104
116
|
} unless decoded_id_token["sub"] == context["userId"] && decoded_id_token["sub"] == profile["userId"]
|
105
117
|
|
106
118
|
source_type = context["type"].gsub("utou", "user")
|
data/lib/kamiliff/version.rb
CHANGED