tinytokenauth-rails 0.1.8 → 0.1.9

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: 16db7cdd60c7295a08eb0ca07fbcc229289cff1a0f867d5147c98fd1c10929e7
4
- data.tar.gz: 483600dc44ab04a814b04f21ef9cf0fe24b09908327d46c6a29b12a5f480bc78
3
+ metadata.gz: 66680bf32b4e6d3afa62c34a808ff3fcd9dcf95dcc5b80fc695930772cd492eb
4
+ data.tar.gz: ba4a8953327622f5c5f3fc99afd006f55d2aff301a55f84f261956d0821d2c4c
5
5
  SHA512:
6
- metadata.gz: 482c5de56d33c9135b2ee74b1a7fa0bc1d5aa43386d9a6ef6dc30acfaed128ad3ef4dc6274e17f6dda82a8370f22bca64566da6d8f62efb3c91c94003695c8d8
7
- data.tar.gz: a7e8813692d44a322b74e37b5562f5e6a9228d1a82b2ec724cef16004615b29856e385029a9d3c7ba05614b71fb0a51b9e1939825a7807aa6ac59b56b3875715
6
+ metadata.gz: 0ad22f16e163112c36ab7642dd7e2f32911e7fc593c68cf63ae48ca5a7dcbc62fb5becc45459fab0fecbac1d90e3a10d4c5ea7376c5d235949cdbba5c963e458
7
+ data.tar.gz: 15b53b180f1e071fb8ae9f7c1c8078f1ab822e6757484b36551275514be6149aa057ae65afa78e78e1402c1973e6e989a54a14afc30cc398cc9ac08b309e6020
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tinytokenauth-rails (0.1.7)
4
+ tinytokenauth-rails (0.1.8)
5
5
  jwt (~> 2.7)
6
6
  rails (>= 6.0)
7
7
 
@@ -20,7 +20,8 @@ module Tinytokenauth
20
20
 
21
21
  begin
22
22
  @decoded = JsonWebToken.decode(Tinytokenauth.configuration.token_secret, token)
23
- @current_user = Tinytokenauth.configuration.user_class.send 'find', @decoded[:user_id]
23
+ # @current_user = Tinytokenauth.configuration.user_class.send 'find', @decoded[:user_id]
24
+ @current_user = User.find @decoded[:user_id]
24
25
  rescue ActiveRecord::RecordNotFound => e
25
26
  render json: { errors: e.message }, status: :unauthorized
26
27
  rescue JWT::DecodeError => e
@@ -32,7 +33,7 @@ module Tinytokenauth
32
33
  token = cookies[Tinytokenauth.configuration.cookie_name]
33
34
  begin
34
35
  @decoded = JsonWebToken.decode(Tinytokenauth.configuration.token_secret, token)
35
- @current_user = Tinytokenauth.configuration.user_class.send 'find', @decoded[:user_id]
36
+ @current_user = User.find @decoded[:user_id]
36
37
  @exp = @decoded[:exp]
37
38
  if Tinytokenauth.configuration.token_auto_renew_hours &&
38
39
  @exp < Tinytokenauth.configuration.token_auto_renew_hours.hours.from_now.to_i
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tinytokenauth
4
- VERSION = "0.1.8"
4
+ VERSION = "0.1.9"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tinytokenauth-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kim Laplume