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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c1af1031691e8a44c53de0db7b33a2b0b6780c745e2132045ab423cad8ba8af9
4
- data.tar.gz: a8735c527d1aa12471dd28c240e5cebb4e69cb3c15c95bd2e5c77ea5d845d26d
3
+ metadata.gz: 11cfdd6d0774b7633ec67141f49a41b8c34a6ae057f076bf91aaae555538236b
4
+ data.tar.gz: c2a05f104e9c15bfa8a287a25b7d8686d5e72d9798282af560b0f7bc274f3642
5
5
  SHA512:
6
- metadata.gz: 0a8b0cf61a6a580a936ea67dfc384d02dbf155ebdcc647a06ee82fd1f1077bf837ca3b4af7d4024701c919f136fcf7680e3fb6f39bcf8e17656b538df8701d25
7
- data.tar.gz: a6f69448aa55004ba4561dfb6c95c54fccc27232a97a982f48c0909b932d017a672e50c9e9ef46fde9657cd2d4a23b2c0c82e26f0efe812e6ef3c09c16c05642
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 {} if context.nil?
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 {} if profile.nil?
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 {} unless decoded_id_token["sub"] == profile["userId"] && decoded_id_token["sub"] == profile["userId"]
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"]
@@ -1,3 +1,3 @@
1
1
  module Kamiliff
2
- VERSION = '0.33.0'
2
+ VERSION = '0.34.0'
3
3
  end
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.33.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-09 00:00:00.000000000 Z
11
+ date: 2022-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails