kamiliff 0.34.0 → 0.35.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 11cfdd6d0774b7633ec67141f49a41b8c34a6ae057f076bf91aaae555538236b
4
- data.tar.gz: c2a05f104e9c15bfa8a287a25b7d8686d5e72d9798282af560b0f7bc274f3642
3
+ metadata.gz: 5cadd63601665e9929d92e4a388c7302da061204ac677151e3f31bd22f3ad5df
4
+ data.tar.gz: 062cdd8edc89cbf4b01b6d7cfd7308f19d31ea1364b5d7b2032dfe749a0104dc
5
5
  SHA512:
6
- metadata.gz: 2a69c31a08788456a74fd2211ca1d607b87f69f5b1c6b0e56d43466f84225b768069637680d5c567091918c8999d1d0e1cd1a594015edd9423a3b54928917b46
7
- data.tar.gz: c3cd30b0d24bb39ec6ff7c6fe4c8fa19f436a56e967db1461904e21c7fa4ada0ebb2e9f4a7ea633f4bbe09f3a31f26f396f1816b8153a34f8eb14e90d5574c94
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")
@@ -1,3 +1,3 @@
1
1
  module Kamiliff
2
- VERSION = '0.34.0'
2
+ VERSION = '0.35.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kamiliff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.34.0
4
+ version: 0.35.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - etrex kuo