ishapi 0.1.8.137 → 0.1.8.138
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/ishapi/application_controller.rb +10 -8
- 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: 484a021badac24fd7cc60e51878246515d9f5a7c0061bc03a530161a9ca52be5
|
4
|
+
data.tar.gz: 69fba225c87c16878d240c94956616cfab4ef3e1a8f3f3214435c2683fa796df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97b91683c848f49d69fb0df659923dbea16d45c0fcbe0f5ef30b8b48e70f7b59783ae6fd6097cba14e0942c98d789bad17f1dc752c231525ef8dda79b3620b3a
|
7
|
+
data.tar.gz: 475504a104554c49b03c937148daf096ae043381bee59d5d9b2baae2e2847f32e432593c63d85849af497d27b3d4ca69937665e422a785b0e0849db608672e79
|
@@ -5,9 +5,6 @@ module Ishapi
|
|
5
5
|
protect_from_forgery :prepend => true, :with => :exception
|
6
6
|
layout :false
|
7
7
|
|
8
|
-
# before_action :check_profile, except: [ :test ]
|
9
|
-
# before_action :set_current_ability
|
10
|
-
|
11
8
|
check_authorization except: [ :long_term_token ]
|
12
9
|
skip_before_action :verify_authenticity_token
|
13
10
|
|
@@ -143,7 +140,7 @@ module Ishapi
|
|
143
140
|
|
144
141
|
# @TODO: refactor [ref-5]
|
145
142
|
sign_in @current_user, scope: :user
|
146
|
-
|
143
|
+
current_ability
|
147
144
|
end
|
148
145
|
|
149
146
|
|
@@ -253,10 +250,15 @@ module Ishapi
|
|
253
250
|
|
254
251
|
# jwt
|
255
252
|
def check_jwt
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
253
|
+
begin
|
254
|
+
decoded = decode(params[:jwt_token])
|
255
|
+
puts! decoded, 'decoded'
|
256
|
+
@current_user = User.find decoded['user_id']
|
257
|
+
rescue JWT::ExpiredSignature
|
258
|
+
Rails.logger.info("JWT::ExpiredSignature")
|
259
|
+
@current_user = User.new
|
260
|
+
end
|
261
|
+
current_ability
|
260
262
|
end
|
261
263
|
|
262
264
|
# jwt
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ishapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.8.
|
4
|
+
version: 0.1.8.138
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|